diff --git a/arm/.global/global.module.tests.ps1 b/arm/.global/global.module.tests.ps1 index 03b11009d5..8b91a19ca9 100644 --- a/arm/.global/global.module.tests.ps1 +++ b/arm/.global/global.module.tests.ps1 @@ -18,15 +18,13 @@ $script:Subscriptiondeployment = 'https://schema.management.azure.com/schemas/20 $script:MGdeployment = 'https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#' $script:Tenantdeployment = 'https://schema.management.azure.com/schemas/2019-08-01/tenantDeploymentTemplate.json#' $script:moduleFolderPaths = $moduleFolderPaths -$script:moduleFolderPathsFiltered = $moduleFolderPaths | Where-Object { - (Split-Path $_ -Leaf) -notin @( 'AzureNetappFiles', 'TrafficManager', 'PrivateDnsZones', 'ManagementGroups') } $script:enforcedTokenList = $enforcedTokenList # For runtime purposes, we cache the compiled template in a hashtable that uses a formatted relative module path as a key $script:convertedTemplates = @{} # Import any helper function used in this test script -Import-Module (Join-Path $PSScriptRoot 'shared\helper.psm1') +Import-Module (Join-Path $PSScriptRoot 'shared\helper.psm1') -Force Describe 'File/folder tests' -Tag Modules { @@ -125,15 +123,19 @@ Describe 'Readme tests' -Tag Readme { if (Test-Path (Join-Path $moduleFolderPath 'deploy.bicep')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.bicep' $templateContent = az bicep build --file $templateFilePath --stdout | ConvertFrom-Json -AsHashtable - } elseif (Test-Path (Join-Path $moduleFolderPath 'deploy.json')) { + } elseIf (Test-Path (Join-Path $moduleFolderPath 'deploy.json')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.json' $templateContent = Get-Content $templateFilePath -Raw | ConvertFrom-Json -AsHashtable } else { throw "No template file found in folder [$moduleFolderPath]" } - $convertedTemplates[$moduleFolderPathKey] = $templateContent + $convertedTemplates[$moduleFolderPathKey] = @{ + templateFilePath = $templateFilePath + templateContent = $templateContent + } } else { - $templateContent = $convertedTemplates[$moduleFolderPathKey] + $templateContent = $convertedTemplates[$moduleFolderPathKey].templateContent + $templateFilePath = $convertedTemplates[$moduleFolderPathKey].templateFilePath } $readmeFolderTestCases += @{ @@ -205,7 +207,7 @@ Describe 'Readme tests' -Tag Readme { } # Get template data - $templateResources = (Get-NestedResourceList -TemplateContent $templateContent | Where-Object { + $templateResources = (Get-NestedResourceList -TemplateFileContent $templateContent | Where-Object { $_.type -notin @('Microsoft.Resources/deployments') -and $_ }).type | Select-Object -Unique # Compare @@ -242,7 +244,7 @@ Describe 'Readme tests' -Tag Readme { } # Get template data - $templateResources = (Get-NestedResourceList -TemplateContent $templateContent | Where-Object { + $templateResources = (Get-NestedResourceList -TemplateFileContent $templateContent | Where-Object { $_.type -notin @('Microsoft.Resources/deployments') -and $_ }).type | Select-Object -Unique # Compare @@ -432,7 +434,6 @@ Describe 'Deployment template tests' -Tag Template { Context 'Deployment template tests' { $deploymentFolderTestCases = [System.Collections.ArrayList] @() - $deploymentFolderTestCasesException = [System.Collections.ArrayList] @() foreach ($moduleFolderPath in $moduleFolderPaths) { # For runtime purposes, we cache the compiled template in a hashtable that uses a formatted relative module path as a key @@ -441,15 +442,19 @@ Describe 'Deployment template tests' -Tag Template { if (Test-Path (Join-Path $moduleFolderPath 'deploy.bicep')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.bicep' $templateContent = az bicep build --file $templateFilePath --stdout | ConvertFrom-Json -AsHashtable - } elseif (Test-Path (Join-Path $moduleFolderPath 'deploy.json')) { + } elseIf (Test-Path (Join-Path $moduleFolderPath 'deploy.json')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.json' $templateContent = Get-Content $templateFilePath -Raw | ConvertFrom-Json -AsHashtable } else { throw "No template file found in folder [$moduleFolderPath]" } - $convertedTemplates[$moduleFolderPathKey] = $templateContent + $convertedTemplates[$moduleFolderPathKey] = @{ + templateFilePath = $templateFilePath + templateContent = $templateContent + } } else { - $templateContent = $convertedTemplates[$moduleFolderPathKey] + $templateContent = $convertedTemplates[$moduleFolderPathKey].templateContent + $templateFilePath = $convertedTemplates[$moduleFolderPathKey].templateFilePath } # Parameter file test cases @@ -477,15 +482,10 @@ Describe 'Deployment template tests' -Tag Template { $deploymentFolderTestCases += @{ moduleFolderName = $moduleFolderPath.Replace('\', '/').Split('/arm/')[1] templateContent = $templateContent + templateFilePath = $templateFilePath parameterFileTestCases = $parameterFileTestCases } } - foreach ($moduleFolderPath in $moduleFolderPathsFiltered) { - $deploymentFolderTestCasesException += @{ - moduleFolderNameException = $moduleFolderPath.Replace('\', '/').Split('/arm/')[1] - templateContent = $templateContent - } - } It '[] the template file should not be empty' -TestCases $deploymentFolderTestCases { param( @@ -507,11 +507,11 @@ Describe 'Deployment template tests' -Tag Template { $SchemaArray = @() if ($Schemaverion -eq $RGdeployment) { $SchemaOutput = $true - } elseif ($Schemaverion -eq $Subscriptiondeployment) { + } elseIf ($Schemaverion -eq $Subscriptiondeployment) { $SchemaOutput = $true - } elseif ($Schemaverion -eq $MGdeployment) { + } elseIf ($Schemaverion -eq $MGdeployment) { $SchemaOutput = $true - } elseif ($Schemaverion -eq $Tenantdeployment) { + } elseIf ($Schemaverion -eq $Tenantdeployment) { $SchemaOutput = $true } else { $SchemaOutput = $false @@ -540,10 +540,10 @@ Describe 'Deployment template tests' -Tag Template { foreach ($API in $ApiVersion) { if ($API.Substring(0, 2) -eq '20') { $ApiVersionOutput = $true - } elseif ($API.substring(1, 10) -eq 'parameters') { + } elseIf ($API.substring(1, 10) -eq 'parameters') { # An API version should not be referenced as a parameter $ApiVersionOutput = $false - } elseif ($API.substring(1, 10) -eq 'variables') { + } elseIf ($API.substring(1, 10) -eq 'variables') { # An API version should not be referenced as a variable $ApiVersionOutput = $false } else { @@ -679,59 +679,62 @@ Describe 'Deployment template tests' -Tag Template { } } - It "[] All resources that have a Location property should refer to the Location parameter 'parameters('Location')'" -TestCases $deploymentFolderTestCasesException { + It '[] Location output should be returned for resources that use it' -TestCases $deploymentFolderTestCases { + param( - $moduleFolderNameException, - $templateContent + [string] $moduleFolderName, + $templateContent, + [string] $templateFilePath ) - $LocationParamFlag = @() - $Locmandoutput = $templateContent.resources - foreach ($Locmand in $Locmandoutput) { - if ($Locmand.Keys -contains 'Location' -and $Locmand.Location -eq "[parameters('Location')]") { - $LocationParamFlag += $true - } elseif ($Locmand.Keys -notcontains 'Location') { - $LocationParamFlag += $true - } elseif ($Locmand.Keys -notcontains 'resourceGroup') { - $LocationParamFlag += $true - } else { - $LocationParamFlag += $false - } - foreach ($Locm in $Locmand.resources) { - if ($Locm.Keys -contains 'Location' -and $Locm.Location -eq "[parameters('Location')]") { - $LocationParamFlag += $true - } elseif ($Locm.Keys -notcontains 'Location') { - $LocationParamFlag += $true - } else { - $LocationParamFlag += $false - } - } + + $outputs = $templateContent.outputs + + $primaryResourceType = (Split-Path $TemplateFilePath -Parent).Replace('\', '/').split('/arm/')[1] + $primaryResourceTypeResource = $templateContent.resources | Where-Object { $_.type -eq $primaryResourceType } + + if ($primaryResourceTypeResource.keys -contains 'location') { + # If the main resource has a location property, an output should be returned too + $outputs.keys | Should -Contain 'location' + + # It should further reference the location property of the primary resource and not e.g. the location input parameter + $outputs.location.value | Should -Match $primaryResourceType } - $LocationParamFlag | Should -Not -Contain $false } - It '[] Standard outputs should be provided (e.g. resourceName, resourceId, resouceGroupName)' -TestCases $deploymentFolderTestCases { + It '[] Resource Group output should exist for resources that are deployed into a resource group scope' -TestCases $deploymentFolderTestCases { + + param( + [string] $moduleFolderName, + $templateContent, + [string] $templateFilePath + ) + + $outputs = $templateContent.outputs.Keys + $deploymentScope = Get-ScopeOfTemplateFile -TemplateFilePath $templateFilePath + + if ($deploymentScope -eq 'resourceGroup') { + $outputs | Should -Contain 'resourceGroupName' + } + } + + It '[] Resource name output should exist' -TestCases $deploymentFolderTestCases { param( $moduleFolderName, $templateContent ) - $Stdoutput = $templateContent.outputs.Keys - $i = 0 - $Schemaverion = $templateContent.'$schema' - if ((($Schemaverion.Split('/')[5]).Split('.')[0]) -eq (($RGdeployment.Split('/')[5]).Split('.')[0])) { - # Resource Group Level deployment - foreach ($Stdo in $Stdoutput) { - if ($Stdo -like '*Name*' -or $Stdo -like '*ResourceId*' -or $Stdo -like '*ResourceGroup*') { - $true | Should -Be $true - $i = $i + 1 - } - } - $i | Should -Not -BeLessThan 3 - } ElseIf ((($schemaverion.Split('/')[5]).Split('.')[0]) -eq (($Subscriptiondeployment.Split('/')[5]).Split('.')[0])) { - # Subscription Level deployment - $Stdoutput | Should -Not -BeNullOrEmpty - } + $outputs = $templateContent.outputs.Keys + $outputs | Should -Contain 'name' + } + + It '[] Resource ID output should exist' -TestCases $deploymentFolderTestCases { + param( + $moduleFolderName, + $templateContent + ) + $outputs = $templateContent.outputs.Keys + $outputs | Should -Contain 'resourceId' } It "[] parameters' description shoud start with a one word category followed by a dot, a space and the actual description text." -TestCases $deploymentFolderTestCases { @@ -844,18 +847,22 @@ Describe "API version tests [All apiVersions in the template should be 'recent'] if (Test-Path (Join-Path $moduleFolderPath 'deploy.bicep')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.bicep' $templateContent = az bicep build --file $templateFilePath --stdout | ConvertFrom-Json -AsHashtable - } elseif (Test-Path (Join-Path $moduleFolderPath 'deploy.json')) { + } elseIf (Test-Path (Join-Path $moduleFolderPath 'deploy.json')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.json' $templateContent = Get-Content $templateFilePath -Raw | ConvertFrom-Json -AsHashtable } else { throw "No template file found in folder [$moduleFolderPath]" } - $convertedTemplates[$moduleFolderPathKey] = $templateContent + $convertedTemplates[$moduleFolderPathKey] = @{ + templateFilePath = $templateFilePath + templateContent = $templateContent + } } else { - $templateContent = $convertedTemplates[$moduleFolderPathKey] + $templateContent = $convertedTemplates[$moduleFolderPathKey].templateContent + $templateFilePath = $convertedTemplates[$moduleFolderPathKey].templateFilePath } - $nestedResources = Get-NestedResourceList -TemplateContent $templateContent | Where-Object { + $nestedResources = Get-NestedResourceList -TemplateFileContent $templateContent | Where-Object { $_.type -notin @('Microsoft.Resources/deployments') -and $_ } | Select-Object 'Type', 'ApiVersion' -Unique | Sort-Object Type diff --git a/arm/.global/shared/helper.psm1 b/arm/.global/shared/helper.psm1 index d793e9afa9..a1a368d6af 100644 --- a/arm/.global/shared/helper.psm1 +++ b/arm/.global/shared/helper.psm1 @@ -1,39 +1,5 @@ -<# -.SYNOPSIS -Get a list of all resources (provider + service) in the given template content +# Load used functions +$repoRootPath = (Get-Item $PSScriptRoot).Parent.Parent.Parent.FullName -.DESCRIPTION -Get a list of all resources (provider + service) in the given template content. Crawls through any children & nested deployment templates. - -.PARAMETER TemplateFileContent -Mandatory. The template file content object to crawl data from - -.EXAMPLE -Get-NestedResourceList -TemplateFileContent @{ resource = @{}; ... } - -Returns a list of all resources in the given template object -#> -function Get-NestedResourceList { - - [CmdletBinding()] - param( - [Parameter(Mandatory)] - [hashtable] $TemplateContent - ) - - $res = @() - $currLevelResources = @() - if ($TemplateContent.resources) { - $currLevelResources += $TemplateContent.resources - } - foreach ($resource in $currLevelResources) { - $res += $resource - - if ($resource.type -eq 'Microsoft.Resources/deployments') { - $res += Get-NestedResourceList -TemplateContent $resource.properties.template - } else { - $res += Get-NestedResourceList -TemplateContent $resource - } - } - return $res -} +. (Join-Path $repoRootPath 'utilities' 'pipelines' 'sharedScripts' 'Get-NestedResourceList.ps1') +. (Join-Path $repoRootPath 'utilities' 'pipelines' 'sharedScripts' 'Get-ScopeOfTemplateFile.ps1') diff --git a/arm/Microsoft.AAD/DomainServices/deploy.bicep b/arm/Microsoft.AAD/DomainServices/deploy.bicep index bd42527189..d47a8e6fcf 100644 --- a/arm/Microsoft.AAD/DomainServices/deploy.bicep +++ b/arm/Microsoft.AAD/DomainServices/deploy.bicep @@ -244,3 +244,6 @@ output resourceGroupName string = resourceGroup().name @description('The resource ID of the Azure Active Directory Domain Services(Azure ADDS).') output resourceId string = domainService.id + +@description('The location the resource was deployed into.') +output location string = domainService.location diff --git a/arm/Microsoft.AAD/DomainServices/readme.md b/arm/Microsoft.AAD/DomainServices/readme.md index 29eca0445b..0b5b5c892d 100644 --- a/arm/Microsoft.AAD/DomainServices/readme.md +++ b/arm/Microsoft.AAD/DomainServices/readme.md @@ -141,6 +141,7 @@ $pfxCertificate = [System.Convert]::ToBase64String($rawCertByteStream) | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The domain name of the Azure Active Directory Domain Services(Azure ADDS). | | `resourceGroupName` | string | The name of the resource group the Azure Active Directory Domain Services(Azure ADDS) was created in. | | `resourceId` | string | The resource ID of the Azure Active Directory Domain Services(Azure ADDS). | diff --git a/arm/Microsoft.AnalysisServices/servers/deploy.bicep b/arm/Microsoft.AnalysisServices/servers/deploy.bicep index acbff28084..728a95e5c7 100644 --- a/arm/Microsoft.AnalysisServices/servers/deploy.bicep +++ b/arm/Microsoft.AnalysisServices/servers/deploy.bicep @@ -162,3 +162,6 @@ output resourceId string = server.id @description('The resource group the analysis service was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = server.location diff --git a/arm/Microsoft.AnalysisServices/servers/readme.md b/arm/Microsoft.AnalysisServices/servers/readme.md index 8c6daf8413..cb5dc66b63 100644 --- a/arm/Microsoft.AnalysisServices/servers/readme.md +++ b/arm/Microsoft.AnalysisServices/servers/readme.md @@ -92,6 +92,7 @@ Create a role assignment for the given resource. If you want to assign a service | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the analysis service. | | `resourceGroupName` | string | The resource group the analysis service was deployed into. | | `resourceId` | string | The resource ID of the analysis service. | diff --git a/arm/Microsoft.ApiManagement/service/deploy.bicep b/arm/Microsoft.ApiManagement/service/deploy.bicep index 21b92ff642..e2d33fe10f 100644 --- a/arm/Microsoft.ApiManagement/service/deploy.bicep +++ b/arm/Microsoft.ApiManagement/service/deploy.bicep @@ -461,3 +461,6 @@ output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(apiManagementService.identity, 'principalId') ? apiManagementService.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = apiManagementService.location diff --git a/arm/Microsoft.ApiManagement/service/readme.md b/arm/Microsoft.ApiManagement/service/readme.md index 17950ae8b6..30ffc8634f 100644 --- a/arm/Microsoft.ApiManagement/service/readme.md +++ b/arm/Microsoft.ApiManagement/service/readme.md @@ -158,6 +158,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the API management service. | | `resourceGroupName` | string | The resource group the API management service was deployed into. | | `resourceId` | string | The resource ID of the API management service. | @@ -167,5 +168,3 @@ You can specify multiple user assigned identities to a resource by providing add ## Considerations - *None* - -======= diff --git a/arm/Microsoft.Authorization/policyAssignments/deploy.bicep b/arm/Microsoft.Authorization/policyAssignments/deploy.bicep index 33077b4da3..30cc798b6b 100644 --- a/arm/Microsoft.Authorization/policyAssignments/deploy.bicep +++ b/arm/Microsoft.Authorization/policyAssignments/deploy.bicep @@ -148,3 +148,6 @@ output principalId string = empty(subscriptionId) && empty(resourceGroupName) ? @sys.description('Policy Assignment resource ID') output resourceId string = empty(subscriptionId) && empty(resourceGroupName) ? policyAssignment_mg.outputs.resourceId : (!empty(subscriptionId) && empty(resourceGroupName) ? policyAssignment_sub.outputs.resourceId : policyAssignment_rg.outputs.resourceId) + +@sys.description('The location the resource was deployed into.') +output location string = empty(subscriptionId) && empty(resourceGroupName) ? policyAssignment_mg.outputs.location : (!empty(subscriptionId) && empty(resourceGroupName) ? policyAssignment_sub.outputs.location : policyAssignment_rg.outputs.location) diff --git a/arm/Microsoft.Authorization/policyAssignments/managementGroup/deploy.bicep b/arm/Microsoft.Authorization/policyAssignments/managementGroup/deploy.bicep index abec837c78..c4e2073351 100644 --- a/arm/Microsoft.Authorization/policyAssignments/managementGroup/deploy.bicep +++ b/arm/Microsoft.Authorization/policyAssignments/managementGroup/deploy.bicep @@ -115,3 +115,6 @@ output principalId string = identity == 'SystemAssigned' ? policyAssignment.iden @sys.description('Policy Assignment resource ID') output resourceId string = extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', managementGroupId), 'Microsoft.Authorization/policyAssignments', policyAssignment.name) + +@sys.description('The location the resource was deployed into.') +output location string = policyAssignment.location diff --git a/arm/Microsoft.Authorization/policyAssignments/managementGroup/readme.md b/arm/Microsoft.Authorization/policyAssignments/managementGroup/readme.md index 640d350ce3..ec36dd295c 100644 --- a/arm/Microsoft.Authorization/policyAssignments/managementGroup/readme.md +++ b/arm/Microsoft.Authorization/policyAssignments/managementGroup/readme.md @@ -45,6 +45,7 @@ With this module you can perform policy assignments on a management group level. | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | Policy Assignment Name | | `principalId` | string | Policy Assignment principal ID | | `resourceId` | string | Policy Assignment resource ID | diff --git a/arm/Microsoft.Authorization/policyAssignments/readme.md b/arm/Microsoft.Authorization/policyAssignments/readme.md index da12994f35..483fdcca30 100644 --- a/arm/Microsoft.Authorization/policyAssignments/readme.md +++ b/arm/Microsoft.Authorization/policyAssignments/readme.md @@ -106,6 +106,7 @@ module policyassignment 'yourpath/arm/Microsoft.Authorization.policyAssignments/ | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | Policy Assignment Name | | `principalId` | string | Policy Assignment principal ID | | `resourceId` | string | Policy Assignment resource ID | diff --git a/arm/Microsoft.Authorization/policyAssignments/resourceGroup/deploy.bicep b/arm/Microsoft.Authorization/policyAssignments/resourceGroup/deploy.bicep index ea4675ccb6..5bb5b7ce02 100644 --- a/arm/Microsoft.Authorization/policyAssignments/resourceGroup/deploy.bicep +++ b/arm/Microsoft.Authorization/policyAssignments/resourceGroup/deploy.bicep @@ -120,3 +120,6 @@ output resourceId string = az.resourceId(subscriptionId, resourceGroupName, 'Mic @sys.description('The name of the resource group the policy was assigned to') output resourceGroupName string = resourceGroup().name + +@sys.description('The location the resource was deployed into.') +output location string = policyAssignment.location diff --git a/arm/Microsoft.Authorization/policyAssignments/resourceGroup/readme.md b/arm/Microsoft.Authorization/policyAssignments/resourceGroup/readme.md index 17d0fecafd..24292c7874 100644 --- a/arm/Microsoft.Authorization/policyAssignments/resourceGroup/readme.md +++ b/arm/Microsoft.Authorization/policyAssignments/resourceGroup/readme.md @@ -46,6 +46,7 @@ With this module you can perform policy assignments on a resource group level | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | Policy Assignment Name | | `principalId` | string | Policy Assignment principal ID | | `resourceGroupName` | string | The name of the resource group the policy was assigned to | diff --git a/arm/Microsoft.Authorization/policyAssignments/subscription/deploy.bicep b/arm/Microsoft.Authorization/policyAssignments/subscription/deploy.bicep index 060a500ecd..c138f2e1c8 100644 --- a/arm/Microsoft.Authorization/policyAssignments/subscription/deploy.bicep +++ b/arm/Microsoft.Authorization/policyAssignments/subscription/deploy.bicep @@ -115,3 +115,6 @@ output principalId string = identity == 'SystemAssigned' ? policyAssignment.iden @sys.description('Policy Assignment resource ID') output resourceId string = subscriptionResourceId(subscriptionId, 'Microsoft.Authorization/policyAssignments', policyAssignment.name) + +@sys.description('The location the resource was deployed into.') +output location string = policyAssignment.location diff --git a/arm/Microsoft.Authorization/policyAssignments/subscription/readme.md b/arm/Microsoft.Authorization/policyAssignments/subscription/readme.md index bb09822f69..086abe5af3 100644 --- a/arm/Microsoft.Authorization/policyAssignments/subscription/readme.md +++ b/arm/Microsoft.Authorization/policyAssignments/subscription/readme.md @@ -45,6 +45,7 @@ With this module you can perform policy assignments on a subscription level. | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | Policy Assignment Name | | `principalId` | string | Policy Assignment principal ID | | `resourceId` | string | Policy Assignment resource ID | diff --git a/arm/Microsoft.Automation/automationAccounts/deploy.bicep b/arm/Microsoft.Automation/automationAccounts/deploy.bicep index e2be4b7325..9442acf62c 100644 --- a/arm/Microsoft.Automation/automationAccounts/deploy.bicep +++ b/arm/Microsoft.Automation/automationAccounts/deploy.bicep @@ -382,3 +382,6 @@ output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(automationAccount.identity, 'principalId') ? automationAccount.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = automationAccount.location diff --git a/arm/Microsoft.Automation/automationAccounts/modules/deploy.bicep b/arm/Microsoft.Automation/automationAccounts/modules/deploy.bicep index 6d562536a0..2927c87e94 100644 --- a/arm/Microsoft.Automation/automationAccounts/modules/deploy.bicep +++ b/arm/Microsoft.Automation/automationAccounts/modules/deploy.bicep @@ -56,3 +56,6 @@ output resourceId string = module.id @description('The resource group of the deployed module.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = module.location diff --git a/arm/Microsoft.Automation/automationAccounts/modules/readme.md b/arm/Microsoft.Automation/automationAccounts/modules/readme.md index 89e4e7c5bb..3a71bb0053 100644 --- a/arm/Microsoft.Automation/automationAccounts/modules/readme.md +++ b/arm/Microsoft.Automation/automationAccounts/modules/readme.md @@ -57,6 +57,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed module. | | `resourceGroupName` | string | The resource group of the deployed module. | | `resourceId` | string | The resource ID of the deployed module. | diff --git a/arm/Microsoft.Automation/automationAccounts/readme.md b/arm/Microsoft.Automation/automationAccounts/readme.md index 3237cb1f58..97175cdfcb 100644 --- a/arm/Microsoft.Automation/automationAccounts/readme.md +++ b/arm/Microsoft.Automation/automationAccounts/readme.md @@ -196,6 +196,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed automation account. | | `resourceGroupName` | string | The resource group of the deployed automation account. | | `resourceId` | string | The resource ID of the deployed automation account. | diff --git a/arm/Microsoft.Automation/automationAccounts/runbooks/deploy.bicep b/arm/Microsoft.Automation/automationAccounts/runbooks/deploy.bicep index 1ee943deca..a51852a424 100644 --- a/arm/Microsoft.Automation/automationAccounts/runbooks/deploy.bicep +++ b/arm/Microsoft.Automation/automationAccounts/runbooks/deploy.bicep @@ -95,3 +95,6 @@ output resourceId string = runbook.id @description('The resource group of the deployed runbook.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = runbook.location diff --git a/arm/Microsoft.Automation/automationAccounts/runbooks/readme.md b/arm/Microsoft.Automation/automationAccounts/runbooks/readme.md index 46a5c293f4..7ef2430444 100644 --- a/arm/Microsoft.Automation/automationAccounts/runbooks/readme.md +++ b/arm/Microsoft.Automation/automationAccounts/runbooks/readme.md @@ -66,6 +66,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed runbook. | | `resourceGroupName` | string | The resource group of the deployed runbook. | | `resourceId` | string | The resource ID of the deployed runbook. | diff --git a/arm/Microsoft.Batch/batchAccounts/deploy.bicep b/arm/Microsoft.Batch/batchAccounts/deploy.bicep index 46e6923030..30c15296d2 100644 --- a/arm/Microsoft.Batch/batchAccounts/deploy.bicep +++ b/arm/Microsoft.Batch/batchAccounts/deploy.bicep @@ -212,3 +212,6 @@ output resourceId string = batchAccount.id @description('The resource group the batch account was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = batchAccount.location diff --git a/arm/Microsoft.Batch/batchAccounts/readme.md b/arm/Microsoft.Batch/batchAccounts/readme.md index e7fe1aff69..89b147bf15 100644 --- a/arm/Microsoft.Batch/batchAccounts/readme.md +++ b/arm/Microsoft.Batch/batchAccounts/readme.md @@ -88,6 +88,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the batch account. | | `resourceGroupName` | string | The resource group the batch account was deployed into. | | `resourceId` | string | The resource ID of the batch account. | diff --git a/arm/Microsoft.CognitiveServices/accounts/deploy.bicep b/arm/Microsoft.CognitiveServices/accounts/deploy.bicep index d80f812ff8..4c7c81208e 100644 --- a/arm/Microsoft.CognitiveServices/accounts/deploy.bicep +++ b/arm/Microsoft.CognitiveServices/accounts/deploy.bicep @@ -279,3 +279,6 @@ output endpoint string = cognitiveServices.properties.endpoint @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(cognitiveServices.identity, 'principalId') ? cognitiveServices.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = cognitiveServices.location diff --git a/arm/Microsoft.CognitiveServices/accounts/readme.md b/arm/Microsoft.CognitiveServices/accounts/readme.md index 71946433aa..1bc858c63c 100644 --- a/arm/Microsoft.CognitiveServices/accounts/readme.md +++ b/arm/Microsoft.CognitiveServices/accounts/readme.md @@ -186,6 +186,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | | `endpoint` | string | The service endpoint of the cognitive services account. | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the cognitive services account. | | `resourceGroupName` | string | The resource group the cognitive services account was deployed into. | | `resourceId` | string | The resource ID of the cognitive services account. | diff --git a/arm/Microsoft.Compute/availabilitySets/deploy.bicep b/arm/Microsoft.Compute/availabilitySets/deploy.bicep index ca4bd3df15..3a3e29b5db 100644 --- a/arm/Microsoft.Compute/availabilitySets/deploy.bicep +++ b/arm/Microsoft.Compute/availabilitySets/deploy.bicep @@ -92,3 +92,6 @@ output resourceId string = availabilitySet.id @description('The resource group the availability set was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = availabilitySet.location diff --git a/arm/Microsoft.Compute/availabilitySets/readme.md b/arm/Microsoft.Compute/availabilitySets/readme.md index 98fc1b105e..76abcc50de 100644 --- a/arm/Microsoft.Compute/availabilitySets/readme.md +++ b/arm/Microsoft.Compute/availabilitySets/readme.md @@ -84,6 +84,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the availability set. | | `resourceGroupName` | string | The resource group the availability set was deployed into. | | `resourceId` | string | The resource ID of the availability set. | diff --git a/arm/Microsoft.Compute/diskEncryptionSets/deploy.bicep b/arm/Microsoft.Compute/diskEncryptionSets/deploy.bicep index c88d8ede42..450cc072f2 100644 --- a/arm/Microsoft.Compute/diskEncryptionSets/deploy.bicep +++ b/arm/Microsoft.Compute/diskEncryptionSets/deploy.bicep @@ -109,3 +109,6 @@ output systemAssignedPrincipalId string = diskEncryptionSet.identity.principalId @description('The name of the key vault with the disk encryption key.') output keyVaultName string = last(split(keyVaultId, '/')) + +@description('The location the resource was deployed into.') +output location string = diskEncryptionSet.location diff --git a/arm/Microsoft.Compute/diskEncryptionSets/readme.md b/arm/Microsoft.Compute/diskEncryptionSets/readme.md index dbc3879679..9d6021e6ce 100644 --- a/arm/Microsoft.Compute/diskEncryptionSets/readme.md +++ b/arm/Microsoft.Compute/diskEncryptionSets/readme.md @@ -84,6 +84,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | | `keyVaultName` | string | The name of the key vault with the disk encryption key. | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the disk encryption set. | | `resourceGroupName` | string | The resource group the disk encryption set was deployed into. | | `resourceId` | string | The resource ID of the disk encryption set. | diff --git a/arm/Microsoft.Compute/disks/deploy.bicep b/arm/Microsoft.Compute/disks/deploy.bicep index 09526184b9..98a1afaaf1 100644 --- a/arm/Microsoft.Compute/disks/deploy.bicep +++ b/arm/Microsoft.Compute/disks/deploy.bicep @@ -159,7 +159,7 @@ resource disk 'Microsoft.Compute/disks@2021-08-01' = { hyperVGeneration: empty(osType) ? null : hyperVGeneration maxShares: maxShares networkAccessPolicy: networkAccessPolicy - osType: empty(osType) ? null : osType + osType: empty(osType) ? any(null) : osType publicNetworkAccess: publicNetworkAccess supportedCapabilities: empty(osType) ? {} : { acceleratedNetwork: acceleratedNetwork @@ -195,3 +195,6 @@ output resourceId string = disk.id @description('The name of the disk.') output name string = disk.name + +@description('The location the resource was deployed into.') +output location string = disk.location diff --git a/arm/Microsoft.Compute/disks/readme.md b/arm/Microsoft.Compute/disks/readme.md index db82282178..f34052620e 100644 --- a/arm/Microsoft.Compute/disks/readme.md +++ b/arm/Microsoft.Compute/disks/readme.md @@ -100,6 +100,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the disk. | | `resourceGroupName` | string | The resource group the disk was deployed into. | | `resourceId` | string | The resource ID of the disk. | diff --git a/arm/Microsoft.Compute/galleries/deploy.bicep b/arm/Microsoft.Compute/galleries/deploy.bicep index 4b509b20f1..27b2ae6151 100644 --- a/arm/Microsoft.Compute/galleries/deploy.bicep +++ b/arm/Microsoft.Compute/galleries/deploy.bicep @@ -109,3 +109,6 @@ output resourceGroupName string = resourceGroup().name @description('The name of the deployed image gallery.') output name string = gallery.name + +@description('The location the resource was deployed into.') +output location string = gallery.location diff --git a/arm/Microsoft.Compute/galleries/images/deploy.bicep b/arm/Microsoft.Compute/galleries/images/deploy.bicep index 64b916d210..beab97c68f 100644 --- a/arm/Microsoft.Compute/galleries/images/deploy.bicep +++ b/arm/Microsoft.Compute/galleries/images/deploy.bicep @@ -169,3 +169,6 @@ output resourceId string = image.id @description('The name of the image.') output name string = image.name + +@description('The location the resource was deployed into.') +output location string = image.location diff --git a/arm/Microsoft.Compute/galleries/images/readme.md b/arm/Microsoft.Compute/galleries/images/readme.md index b7de5286d8..4b39c804af 100644 --- a/arm/Microsoft.Compute/galleries/images/readme.md +++ b/arm/Microsoft.Compute/galleries/images/readme.md @@ -102,6 +102,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the image. | | `resourceGroupName` | string | The resource group the image was deployed into. | | `resourceId` | string | The resource ID of the image. | diff --git a/arm/Microsoft.Compute/galleries/readme.md b/arm/Microsoft.Compute/galleries/readme.md index fa12ca213f..828101fe71 100644 --- a/arm/Microsoft.Compute/galleries/readme.md +++ b/arm/Microsoft.Compute/galleries/readme.md @@ -83,6 +83,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed image gallery. | | `resourceGroupName` | string | The resource group of the deployed image gallery. | | `resourceId` | string | The resource ID of the deployed image gallery. | diff --git a/arm/Microsoft.Compute/images/deploy.bicep b/arm/Microsoft.Compute/images/deploy.bicep index 8fb138e738..bfb2bfaee5 100644 --- a/arm/Microsoft.Compute/images/deploy.bicep +++ b/arm/Microsoft.Compute/images/deploy.bicep @@ -81,3 +81,6 @@ output resourceGroupName string = resourceGroup().name @description('The name of the image.') output name string = image.name + +@description('The location the resource was deployed into.') +output location string = image.location diff --git a/arm/Microsoft.Compute/images/readme.md b/arm/Microsoft.Compute/images/readme.md index 9d408f2964..f846c7a710 100644 --- a/arm/Microsoft.Compute/images/readme.md +++ b/arm/Microsoft.Compute/images/readme.md @@ -84,6 +84,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the image. | | `resourceGroupName` | string | The resource group the image was deployed into. | | `resourceId` | string | The resource ID of the image. | diff --git a/arm/Microsoft.Compute/proximityPlacementGroups/deploy.bicep b/arm/Microsoft.Compute/proximityPlacementGroups/deploy.bicep index d82af3f674..90f06cff8f 100644 --- a/arm/Microsoft.Compute/proximityPlacementGroups/deploy.bicep +++ b/arm/Microsoft.Compute/proximityPlacementGroups/deploy.bicep @@ -77,3 +77,6 @@ output resourceId string = proximityPlacementGroup.id @description('The resource group the proximity placement group was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = proximityPlacementGroup.location diff --git a/arm/Microsoft.Compute/proximityPlacementGroups/readme.md b/arm/Microsoft.Compute/proximityPlacementGroups/readme.md index 0b600d32ff..0566552a56 100644 --- a/arm/Microsoft.Compute/proximityPlacementGroups/readme.md +++ b/arm/Microsoft.Compute/proximityPlacementGroups/readme.md @@ -81,6 +81,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the proximity placement group. | | `resourceGroupName` | string | The resource group the proximity placement group was deployed into. | | `resourceId` | string | The resourceId the proximity placement group. | diff --git a/arm/Microsoft.Compute/virtualMachineScaleSets/deploy.bicep b/arm/Microsoft.Compute/virtualMachineScaleSets/deploy.bicep index f346e20a79..849a15c0ee 100644 --- a/arm/Microsoft.Compute/virtualMachineScaleSets/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachineScaleSets/deploy.bicep @@ -667,3 +667,6 @@ output name string = vmss.name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(vmss.identity, 'principalId') ? vmss.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = vmss.location diff --git a/arm/Microsoft.Compute/virtualMachineScaleSets/readme.md b/arm/Microsoft.Compute/virtualMachineScaleSets/readme.md index e1957773e8..bb5dba1148 100644 --- a/arm/Microsoft.Compute/virtualMachineScaleSets/readme.md +++ b/arm/Microsoft.Compute/virtualMachineScaleSets/readme.md @@ -427,6 +427,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the virtual machine scale set. | | `resourceGroupName` | string | The resource group of the virtual machine scale set. | | `resourceId` | string | The resource ID of the virtual machine scale set. | diff --git a/arm/Microsoft.Compute/virtualMachines/deploy.bicep b/arm/Microsoft.Compute/virtualMachines/deploy.bicep index 23c728444e..a589c32d40 100644 --- a/arm/Microsoft.Compute/virtualMachines/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachines/deploy.bicep @@ -656,3 +656,6 @@ output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(virtualMachine.identity, 'principalId') ? virtualMachine.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = virtualMachine.location diff --git a/arm/Microsoft.Compute/virtualMachines/extensions/deploy.bicep b/arm/Microsoft.Compute/virtualMachines/extensions/deploy.bicep index 14b6bfaac1..4a244a6e7d 100644 --- a/arm/Microsoft.Compute/virtualMachines/extensions/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachines/extensions/deploy.bicep @@ -79,3 +79,6 @@ output resourceId string = extension.id @description('The name of the Resource Group the extension was created in.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = extension.location diff --git a/arm/Microsoft.Compute/virtualMachines/extensions/readme.md b/arm/Microsoft.Compute/virtualMachines/extensions/readme.md index 1e387f965a..9f264c41f3 100644 --- a/arm/Microsoft.Compute/virtualMachines/extensions/readme.md +++ b/arm/Microsoft.Compute/virtualMachines/extensions/readme.md @@ -46,6 +46,7 @@ This module deploys a virtual machine extension. | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the extension. | | `resourceGroupName` | string | The name of the Resource Group the extension was created in. | | `resourceId` | string | The resource ID of the extension. | diff --git a/arm/Microsoft.Compute/virtualMachines/readme.md b/arm/Microsoft.Compute/virtualMachines/readme.md index 53fb2b9130..55ddb9400b 100644 --- a/arm/Microsoft.Compute/virtualMachines/readme.md +++ b/arm/Microsoft.Compute/virtualMachines/readme.md @@ -543,6 +543,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the VM. | | `resourceGroupName` | string | The name of the resource group the VM was created in. | | `resourceId` | string | The resource ID of the VM. | diff --git a/arm/Microsoft.ContainerInstance/containerGroups/deploy.bicep b/arm/Microsoft.ContainerInstance/containerGroups/deploy.bicep index b28bc80765..0424d6f403 100644 --- a/arm/Microsoft.ContainerInstance/containerGroups/deploy.bicep +++ b/arm/Microsoft.ContainerInstance/containerGroups/deploy.bicep @@ -134,3 +134,6 @@ output iPv4Address string = containergroup.properties.ipAddress.ip @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(containergroup.identity, 'principalId') ? containergroup.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = containergroup.location diff --git a/arm/Microsoft.ContainerInstance/containerGroups/readme.md b/arm/Microsoft.ContainerInstance/containerGroups/readme.md index 375aa7d1b4..dc5aae763c 100644 --- a/arm/Microsoft.ContainerInstance/containerGroups/readme.md +++ b/arm/Microsoft.ContainerInstance/containerGroups/readme.md @@ -95,6 +95,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | | `iPv4Address` | string | The IPv4 address of the container group. | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the container group. | | `resourceGroupName` | string | The resource group the container group was deployed into. | | `resourceId` | string | The resource ID of the container group. | diff --git a/arm/Microsoft.ContainerRegistry/registries/deploy.bicep b/arm/Microsoft.ContainerRegistry/registries/deploy.bicep index 8f1eaf19cf..c379d512a8 100644 --- a/arm/Microsoft.ContainerRegistry/registries/deploy.bicep +++ b/arm/Microsoft.ContainerRegistry/registries/deploy.bicep @@ -304,3 +304,6 @@ output resourceId string = registry.id @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(registry.identity, 'principalId') ? registry.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = registry.location diff --git a/arm/Microsoft.ContainerRegistry/registries/readme.md b/arm/Microsoft.ContainerRegistry/registries/readme.md index f7702e7a4f..f6cc81d4c6 100644 --- a/arm/Microsoft.ContainerRegistry/registries/readme.md +++ b/arm/Microsoft.ContainerRegistry/registries/readme.md @@ -186,6 +186,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `loginServer` | string | The reference to the Azure container registry. | | `name` | string | The Name of the Azure container registry. | | `resourceGroupName` | string | The name of the Azure container registry. | diff --git a/arm/Microsoft.ContainerRegistry/registries/replications/deploy.bicep b/arm/Microsoft.ContainerRegistry/registries/replications/deploy.bicep index 43be6e20c6..515f6da4f9 100644 --- a/arm/Microsoft.ContainerRegistry/registries/replications/deploy.bicep +++ b/arm/Microsoft.ContainerRegistry/registries/replications/deploy.bicep @@ -58,3 +58,6 @@ output resourceId string = replication.id @description('The name of the resource group the replication was created in.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = replication.location diff --git a/arm/Microsoft.ContainerRegistry/registries/replications/readme.md b/arm/Microsoft.ContainerRegistry/registries/replications/readme.md index f13afdc431..179e9d66b3 100644 --- a/arm/Microsoft.ContainerRegistry/registries/replications/readme.md +++ b/arm/Microsoft.ContainerRegistry/registries/replications/readme.md @@ -57,6 +57,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the replication. | | `resourceGroupName` | string | The name of the resource group the replication was created in. | | `resourceId` | string | The resource ID of the replication. | diff --git a/arm/Microsoft.ContainerService/managedClusters/deploy.bicep b/arm/Microsoft.ContainerService/managedClusters/deploy.bicep index 8823f2eed6..1b392691eb 100644 --- a/arm/Microsoft.ContainerService/managedClusters/deploy.bicep +++ b/arm/Microsoft.ContainerService/managedClusters/deploy.bicep @@ -584,3 +584,6 @@ output kubeletidentityObjectId string = contains(managedCluster.properties, 'ide @description('The Object ID of the OMS agent identity.') output omsagentIdentityObjectId string = contains(managedCluster.properties, 'addonProfiles') ? contains(managedCluster.properties.addonProfiles, 'omsagent') ? contains(managedCluster.properties.addonProfiles.omsagent, 'identity') ? managedCluster.properties.addonProfiles.omsagent.identity.objectId : '' : '' : '' + +@description('The location the resource was deployed into.') +output location string = managedCluster.location diff --git a/arm/Microsoft.ContainerService/managedClusters/readme.md b/arm/Microsoft.ContainerService/managedClusters/readme.md index ce9ff275e9..260a76b5a1 100644 --- a/arm/Microsoft.ContainerService/managedClusters/readme.md +++ b/arm/Microsoft.ContainerService/managedClusters/readme.md @@ -247,6 +247,7 @@ You can specify multiple user assigned identities to a resource by providing add | :-- | :-- | :-- | | `controlPlaneFQDN` | string | The control plane FQDN of the managed cluster. | | `kubeletidentityObjectId` | string | The Object ID of the AKS identity. | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the managed cluster. | | `omsagentIdentityObjectId` | string | The Object ID of the OMS agent identity. | | `resourceGroupName` | string | The resource group the managed cluster was deployed into. | diff --git a/arm/Microsoft.DataFactory/factories/deploy.bicep b/arm/Microsoft.DataFactory/factories/deploy.bicep index df9bf68066..ec2549f3ce 100644 --- a/arm/Microsoft.DataFactory/factories/deploy.bicep +++ b/arm/Microsoft.DataFactory/factories/deploy.bicep @@ -226,3 +226,6 @@ output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(dataFactory.identity, 'principalId') ? dataFactory.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = dataFactory.location diff --git a/arm/Microsoft.DataFactory/factories/readme.md b/arm/Microsoft.DataFactory/factories/readme.md index 8f95c87e42..0b6fcfb772 100644 --- a/arm/Microsoft.DataFactory/factories/readme.md +++ b/arm/Microsoft.DataFactory/factories/readme.md @@ -114,6 +114,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The Name of the Azure Data Factory instance. | | `resourceGroupName` | string | The name of the Resource Group with the Data factory. | | `resourceId` | string | The Resource ID of the Data factory. | diff --git a/arm/Microsoft.Databricks/workspaces/deploy.bicep b/arm/Microsoft.Databricks/workspaces/deploy.bicep index f13a35fd33..6a9addb035 100644 --- a/arm/Microsoft.Databricks/workspaces/deploy.bicep +++ b/arm/Microsoft.Databricks/workspaces/deploy.bicep @@ -159,3 +159,6 @@ output resourceId string = workspace.id @description('The resource group of the deployed databricks workspace.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = workspace.location diff --git a/arm/Microsoft.Databricks/workspaces/readme.md b/arm/Microsoft.Databricks/workspaces/readme.md index 93a72e679c..942c910bac 100644 --- a/arm/Microsoft.Databricks/workspaces/readme.md +++ b/arm/Microsoft.Databricks/workspaces/readme.md @@ -122,6 +122,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed databricks workspace. | | `resourceGroupName` | string | The resource group of the deployed databricks workspace. | | `resourceId` | string | The resource ID of the deployed databricks workspace. | diff --git a/arm/Microsoft.DesktopVirtualization/applicationgroups/deploy.bicep b/arm/Microsoft.DesktopVirtualization/applicationgroups/deploy.bicep index 8885f6c25a..646c961c7f 100644 --- a/arm/Microsoft.DesktopVirtualization/applicationgroups/deploy.bicep +++ b/arm/Microsoft.DesktopVirtualization/applicationgroups/deploy.bicep @@ -167,3 +167,6 @@ output resourceGroupName string = resourceGroup().name @sys.description('The name of the AVD application group') output name string = appGroup.name + +@sys.description('The location the resource was deployed into.') +output location string = appGroup.location diff --git a/arm/Microsoft.DesktopVirtualization/applicationgroups/readme.md b/arm/Microsoft.DesktopVirtualization/applicationgroups/readme.md index cf12868073..fcc29b9fb9 100644 --- a/arm/Microsoft.DesktopVirtualization/applicationgroups/readme.md +++ b/arm/Microsoft.DesktopVirtualization/applicationgroups/readme.md @@ -94,6 +94,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the AVD application group | | `resourceGroupName` | string | The resource group the AVD application group was deployed into | | `resourceId` | string | The resource ID of the AVD application group | diff --git a/arm/Microsoft.DesktopVirtualization/hostpools/deploy.bicep b/arm/Microsoft.DesktopVirtualization/hostpools/deploy.bicep index 13ba9d93c3..ab23fb2f06 100644 --- a/arm/Microsoft.DesktopVirtualization/hostpools/deploy.bicep +++ b/arm/Microsoft.DesktopVirtualization/hostpools/deploy.bicep @@ -212,3 +212,6 @@ output name string = hostPool.name @description('The expiration time for the registration token.') output tokenExpirationTime string = dateTimeAdd(baseTime, tokenValidityLength) + +@description('The location the resource was deployed into.') +output location string = hostPool.location diff --git a/arm/Microsoft.DesktopVirtualization/hostpools/readme.md b/arm/Microsoft.DesktopVirtualization/hostpools/readme.md index 0261ef7e56..b48e6eb63c 100644 --- a/arm/Microsoft.DesktopVirtualization/hostpools/readme.md +++ b/arm/Microsoft.DesktopVirtualization/hostpools/readme.md @@ -140,6 +140,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the AVD host pool. | | `resourceGroupName` | string | The resource group the AVD host pool was deployed into. | | `resourceId` | string | The resource ID of the AVD host pool. | diff --git a/arm/Microsoft.DesktopVirtualization/scalingplans/deploy.bicep b/arm/Microsoft.DesktopVirtualization/scalingplans/deploy.bicep index f56f0ce13d..ff6481d64d 100644 --- a/arm/Microsoft.DesktopVirtualization/scalingplans/deploy.bicep +++ b/arm/Microsoft.DesktopVirtualization/scalingplans/deploy.bicep @@ -154,3 +154,6 @@ output resourceGroupName string = resourceGroup().name @description('The name of the AVD scaling plan.') output name string = scalingPlan.name + +@description('The location the resource was deployed into.') +output location string = scalingPlan.location diff --git a/arm/Microsoft.DesktopVirtualization/scalingplans/readme.md b/arm/Microsoft.DesktopVirtualization/scalingplans/readme.md index f3f651d25e..d89b637560 100644 --- a/arm/Microsoft.DesktopVirtualization/scalingplans/readme.md +++ b/arm/Microsoft.DesktopVirtualization/scalingplans/readme.md @@ -139,6 +139,7 @@ Create a role assignment for the given resource. If you want to assign a service | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the AVD scaling plan. | | `resourceGroupName` | string | The resource group the AVD scaling plan was deployed into. | | `resourceId` | string | The resource ID of the AVD scaling plan. | diff --git a/arm/Microsoft.DesktopVirtualization/workspaces/deploy.bicep b/arm/Microsoft.DesktopVirtualization/workspaces/deploy.bicep index 10be7a651b..1c5be804e2 100644 --- a/arm/Microsoft.DesktopVirtualization/workspaces/deploy.bicep +++ b/arm/Microsoft.DesktopVirtualization/workspaces/deploy.bicep @@ -136,3 +136,6 @@ output resourceGroupName string = resourceGroup().name @description('The name of the AVD workspace.') output name string = workspace.name + +@description('The location the resource was deployed into.') +output location string = workspace.location diff --git a/arm/Microsoft.DesktopVirtualization/workspaces/readme.md b/arm/Microsoft.DesktopVirtualization/workspaces/readme.md index 9558f077d6..1194aa34b4 100644 --- a/arm/Microsoft.DesktopVirtualization/workspaces/readme.md +++ b/arm/Microsoft.DesktopVirtualization/workspaces/readme.md @@ -91,6 +91,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the AVD workspace. | | `resourceGroupName` | string | The resource group the AVD workspace was deployed into. | | `resourceId` | string | The resource ID of the AVD workspace. | diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep index af09fdb043..b8c0c6b4d5 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep +++ b/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep @@ -280,3 +280,6 @@ output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(databaseAccount.identity, 'principalId') ? databaseAccount.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = databaseAccount.location diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/readme.md b/arm/Microsoft.DocumentDB/databaseAccounts/readme.md index 1965fe9034..64f4bdf356 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/readme.md +++ b/arm/Microsoft.DocumentDB/databaseAccounts/readme.md @@ -223,6 +223,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the database account. | | `resourceGroupName` | string | The name of the resource group the database account was created in. | | `resourceId` | string | The resource ID of the database account. | diff --git a/arm/Microsoft.EventGrid/systemTopics/deploy.bicep b/arm/Microsoft.EventGrid/systemTopics/deploy.bicep index a7cb0c9c81..11edd194de 100644 --- a/arm/Microsoft.EventGrid/systemTopics/deploy.bicep +++ b/arm/Microsoft.EventGrid/systemTopics/deploy.bicep @@ -175,3 +175,6 @@ output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(systemTopic.identity, 'principalId') ? systemTopic.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = systemTopic.location diff --git a/arm/Microsoft.EventGrid/systemTopics/readme.md b/arm/Microsoft.EventGrid/systemTopics/readme.md index 8bdab4d97c..c49b32710c 100644 --- a/arm/Microsoft.EventGrid/systemTopics/readme.md +++ b/arm/Microsoft.EventGrid/systemTopics/readme.md @@ -145,6 +145,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the event grid system topic. | | `resourceGroupName` | string | The name of the resource group the event grid system topic was deployed into. | | `resourceId` | string | The resource ID of the event grid system topic. | diff --git a/arm/Microsoft.EventGrid/topics/deploy.bicep b/arm/Microsoft.EventGrid/topics/deploy.bicep index ce07cdf85c..918f614863 100644 --- a/arm/Microsoft.EventGrid/topics/deploy.bicep +++ b/arm/Microsoft.EventGrid/topics/deploy.bicep @@ -160,3 +160,6 @@ output resourceId string = eventGrid.id @description('The name of the resource group the event grid was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = eventGrid.location diff --git a/arm/Microsoft.EventGrid/topics/readme.md b/arm/Microsoft.EventGrid/topics/readme.md index a329338dd8..2c7b65dcf4 100644 --- a/arm/Microsoft.EventGrid/topics/readme.md +++ b/arm/Microsoft.EventGrid/topics/readme.md @@ -130,6 +130,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the event grid topic. | | `resourceGroupName` | string | The name of the resource group the event grid was deployed into. | | `resourceId` | string | The resource ID of the event grid. | diff --git a/arm/Microsoft.EventHub/namespaces/deploy.bicep b/arm/Microsoft.EventHub/namespaces/deploy.bicep index a8d1e22a39..00529fac2c 100644 --- a/arm/Microsoft.EventHub/namespaces/deploy.bicep +++ b/arm/Microsoft.EventHub/namespaces/deploy.bicep @@ -296,3 +296,6 @@ output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(eventHubNamespace.identity, 'principalId') ? eventHubNamespace.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = eventHubNamespace.location diff --git a/arm/Microsoft.EventHub/namespaces/readme.md b/arm/Microsoft.EventHub/namespaces/readme.md index 2f6ee74243..f0f7c95209 100644 --- a/arm/Microsoft.EventHub/namespaces/readme.md +++ b/arm/Microsoft.EventHub/namespaces/readme.md @@ -153,6 +153,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the eventspace. | | `resourceGroupName` | string | The resource group where the namespace is deployed. | | `resourceId` | string | The resource ID of the eventspace. | diff --git a/arm/Microsoft.HealthBot/healthBots/deploy.bicep b/arm/Microsoft.HealthBot/healthBots/deploy.bicep index fe83df5a21..d2fa21acc8 100644 --- a/arm/Microsoft.HealthBot/healthBots/deploy.bicep +++ b/arm/Microsoft.HealthBot/healthBots/deploy.bicep @@ -74,3 +74,6 @@ output name string = azureHealthBot.name @description('The resource ID of the health bot.') output resourceId string = azureHealthBot.id + +@description('The location the resource was deployed into.') +output location string = azureHealthBot.location diff --git a/arm/Microsoft.HealthBot/healthBots/readme.md b/arm/Microsoft.HealthBot/healthBots/readme.md index 186e174a6f..d27b41f16a 100644 --- a/arm/Microsoft.HealthBot/healthBots/readme.md +++ b/arm/Microsoft.HealthBot/healthBots/readme.md @@ -81,6 +81,7 @@ Create a role assignment for the given resource. If you want to assign a service | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the health bot. | | `resourceGroupName` | string | The resource group the health bot was deployed into. | | `resourceId` | string | The resource ID of the health bot. | diff --git a/arm/Microsoft.Insights/actionGroups/deploy.bicep b/arm/Microsoft.Insights/actionGroups/deploy.bicep index 838f53b28b..ff7a611104 100644 --- a/arm/Microsoft.Insights/actionGroups/deploy.bicep +++ b/arm/Microsoft.Insights/actionGroups/deploy.bicep @@ -100,3 +100,6 @@ output name string = actionGroup.name @description('The resource ID of the action group .') output resourceId string = actionGroup.id + +@description('The location the resource was deployed into.') +output location string = actionGroup.location diff --git a/arm/Microsoft.Insights/actionGroups/readme.md b/arm/Microsoft.Insights/actionGroups/readme.md index 2b2effca44..78083b9d54 100644 --- a/arm/Microsoft.Insights/actionGroups/readme.md +++ b/arm/Microsoft.Insights/actionGroups/readme.md @@ -134,6 +134,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the action group . | | `resourceGroupName` | string | The resource group the action group was deployed into. | | `resourceId` | string | The resource ID of the action group . | diff --git a/arm/Microsoft.Insights/activityLogAlerts/deploy.bicep b/arm/Microsoft.Insights/activityLogAlerts/deploy.bicep index 19347de195..b37cdfa502 100644 --- a/arm/Microsoft.Insights/activityLogAlerts/deploy.bicep +++ b/arm/Microsoft.Insights/activityLogAlerts/deploy.bicep @@ -83,3 +83,6 @@ output resourceId string = activityLogAlert.id @description('The resource group the activity log alert was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = activityLogAlert.location diff --git a/arm/Microsoft.Insights/activityLogAlerts/readme.md b/arm/Microsoft.Insights/activityLogAlerts/readme.md index 3ac50229ec..160feb1372 100644 --- a/arm/Microsoft.Insights/activityLogAlerts/readme.md +++ b/arm/Microsoft.Insights/activityLogAlerts/readme.md @@ -188,6 +188,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the activity log alert. | | `resourceGroupName` | string | The resource group the activity log alert was deployed into. | | `resourceId` | string | The resource ID of the activity log alert. | diff --git a/arm/Microsoft.Insights/components/deploy.bicep b/arm/Microsoft.Insights/components/deploy.bicep index c7d8edc728..2b1451f710 100644 --- a/arm/Microsoft.Insights/components/deploy.bicep +++ b/arm/Microsoft.Insights/components/deploy.bicep @@ -108,3 +108,6 @@ output resourceGroupName string = resourceGroup().name @description('The application ID of the application insights component.') output applicationId string = appInsights.properties.AppId + +@description('The location the resource was deployed into.') +output location string = appInsights.location diff --git a/arm/Microsoft.Insights/components/readme.md b/arm/Microsoft.Insights/components/readme.md index 1043b9b0c3..84e9b0362e 100644 --- a/arm/Microsoft.Insights/components/readme.md +++ b/arm/Microsoft.Insights/components/readme.md @@ -84,6 +84,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | | `applicationId` | string | The application ID of the application insights component. | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the application insights component. | | `resourceGroupName` | string | The resource group the application insights component was deployed into. | | `resourceId` | string | The resource ID of the application insights component. | diff --git a/arm/Microsoft.Insights/metricAlerts/deploy.bicep b/arm/Microsoft.Insights/metricAlerts/deploy.bicep index e0e180f82f..926b7e2bb3 100644 --- a/arm/Microsoft.Insights/metricAlerts/deploy.bicep +++ b/arm/Microsoft.Insights/metricAlerts/deploy.bicep @@ -138,3 +138,6 @@ output name string = metricAlert.name @description('The resource ID of the metric alert.') output resourceId string = metricAlert.id + +@description('The location the resource was deployed into.') +output location string = metricAlert.location diff --git a/arm/Microsoft.Insights/metricAlerts/readme.md b/arm/Microsoft.Insights/metricAlerts/readme.md index f6f9944f2c..704a1040e1 100644 --- a/arm/Microsoft.Insights/metricAlerts/readme.md +++ b/arm/Microsoft.Insights/metricAlerts/readme.md @@ -182,6 +182,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the metric alert. | | `resourceGroupName` | string | The resource group the metric alert was deployed into. | | `resourceId` | string | The resource ID of the metric alert. | diff --git a/arm/Microsoft.Insights/privateLinkScopes/deploy.bicep b/arm/Microsoft.Insights/privateLinkScopes/deploy.bicep index 75dce2fc12..7b2f257c2a 100644 --- a/arm/Microsoft.Insights/privateLinkScopes/deploy.bicep +++ b/arm/Microsoft.Insights/privateLinkScopes/deploy.bicep @@ -95,3 +95,6 @@ output resourceId string = privateLinkScope.id @description('The resource group the private link scope was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = privateLinkScope.location diff --git a/arm/Microsoft.Insights/privateLinkScopes/readme.md b/arm/Microsoft.Insights/privateLinkScopes/readme.md index 48412bd92f..4666579f97 100644 --- a/arm/Microsoft.Insights/privateLinkScopes/readme.md +++ b/arm/Microsoft.Insights/privateLinkScopes/readme.md @@ -121,6 +121,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the private link scope. | | `resourceGroupName` | string | The resource group the private link scope was deployed into. | | `resourceId` | string | The resource ID of the private link scope. | diff --git a/arm/Microsoft.Insights/scheduledQueryRules/deploy.bicep b/arm/Microsoft.Insights/scheduledQueryRules/deploy.bicep index 3212d3f128..56c1f8bad0 100644 --- a/arm/Microsoft.Insights/scheduledQueryRules/deploy.bicep +++ b/arm/Microsoft.Insights/scheduledQueryRules/deploy.bicep @@ -124,3 +124,6 @@ output resourceId string = queryRule.id @description('The Resource Group of the created query rule.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = queryRule.location diff --git a/arm/Microsoft.Insights/scheduledQueryRules/readme.md b/arm/Microsoft.Insights/scheduledQueryRules/readme.md index 21cda099f4..280c77a197 100644 --- a/arm/Microsoft.Insights/scheduledQueryRules/readme.md +++ b/arm/Microsoft.Insights/scheduledQueryRules/readme.md @@ -92,6 +92,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The Name of the created query rule. | | `resourceGroupName` | string | The Resource Group of the created query rule. | | `resourceId` | string | The resource ID of the created query rule. | diff --git a/arm/Microsoft.KeyVault/vaults/deploy.bicep b/arm/Microsoft.KeyVault/vaults/deploy.bicep index e952827a70..681eaf3a0a 100644 --- a/arm/Microsoft.KeyVault/vaults/deploy.bicep +++ b/arm/Microsoft.KeyVault/vaults/deploy.bicep @@ -314,3 +314,6 @@ output name string = keyVault.name @description('The URI of the key vault.') output uri string = keyVault.properties.vaultUri + +@description('The location the resource was deployed into.') +output location string = keyVault.location diff --git a/arm/Microsoft.KeyVault/vaults/readme.md b/arm/Microsoft.KeyVault/vaults/readme.md index f6cc56a85e..ca0631a7da 100644 --- a/arm/Microsoft.KeyVault/vaults/readme.md +++ b/arm/Microsoft.KeyVault/vaults/readme.md @@ -196,6 +196,7 @@ To use Private Endpoint the following dependencies must be deployed: | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the key vault. | | `resourceGroupName` | string | The name of the resource group the key vault was created in. | | `resourceId` | string | The resource ID of the key vault. | diff --git a/arm/Microsoft.Logic/workflows/deploy.bicep b/arm/Microsoft.Logic/workflows/deploy.bicep index c77bc499b3..6a2743b7a0 100644 --- a/arm/Microsoft.Logic/workflows/deploy.bicep +++ b/arm/Microsoft.Logic/workflows/deploy.bicep @@ -234,3 +234,6 @@ output resourceId string = logicApp.id @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(logicApp.identity, 'principalId') ? logicApp.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = logicApp.location diff --git a/arm/Microsoft.Logic/workflows/readme.md b/arm/Microsoft.Logic/workflows/readme.md index 995599c431..5c9b86a377 100644 --- a/arm/Microsoft.Logic/workflows/readme.md +++ b/arm/Microsoft.Logic/workflows/readme.md @@ -172,6 +172,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the logic app. | | `resourceGroupName` | string | The resource group the logic app was deployed into. | | `resourceId` | string | The resource ID of the logic app. | diff --git a/arm/Microsoft.MachineLearningServices/workspaces/computes/deploy.bicep b/arm/Microsoft.MachineLearningServices/workspaces/computes/deploy.bicep index 57dafe1d81..68f8430488 100644 --- a/arm/Microsoft.MachineLearningServices/workspaces/computes/deploy.bicep +++ b/arm/Microsoft.MachineLearningServices/workspaces/computes/deploy.bicep @@ -134,3 +134,6 @@ output resourceGroupName string = resourceGroup().name @sys.description('The principal ID of the system assigned identity. Is null in case of attaching a compute resource, i.e. when you provide a resource ID.') output systemAssignedPrincipalId string = empty(resourceId) ? (systemAssignedIdentity && contains(machineLearningWorkspaceCompute.identity, 'principalId') ? machineLearningWorkspaceCompute.identity.principalId : '') : '' + +@sys.description('The location the resource was deployed into.') +output location string = machineLearningWorkspace.location diff --git a/arm/Microsoft.MachineLearningServices/workspaces/computes/readme.md b/arm/Microsoft.MachineLearningServices/workspaces/computes/readme.md index 034b71a30e..0b5d72d4be 100644 --- a/arm/Microsoft.MachineLearningServices/workspaces/computes/readme.md +++ b/arm/Microsoft.MachineLearningServices/workspaces/computes/readme.md @@ -92,6 +92,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the compute. | | `resourceGroupName` | string | The resource group the compute was deployed into. | | `resourceId` | string | The resource ID of the compute. | diff --git a/arm/Microsoft.MachineLearningServices/workspaces/deploy.bicep b/arm/Microsoft.MachineLearningServices/workspaces/deploy.bicep index be4ec84b51..f574487786 100644 --- a/arm/Microsoft.MachineLearningServices/workspaces/deploy.bicep +++ b/arm/Microsoft.MachineLearningServices/workspaces/deploy.bicep @@ -291,3 +291,6 @@ output name string = workspace.name @sys.description('The principal ID of the system assigned identity.') output principalId string = (!empty(identity) && contains(identity.type, 'SystemAssigned')) ? workspace.identity.principalId : '' + +@sys.description('The location the resource was deployed into.') +output location string = workspace.location diff --git a/arm/Microsoft.MachineLearningServices/workspaces/readme.md b/arm/Microsoft.MachineLearningServices/workspaces/readme.md index eeecadf235..d66d772e01 100644 --- a/arm/Microsoft.MachineLearningServices/workspaces/readme.md +++ b/arm/Microsoft.MachineLearningServices/workspaces/readme.md @@ -215,6 +215,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the machine learning service | | `principalId` | string | The principal ID of the system assigned identity. | | `resourceGroupName` | string | The resource group the machine learning service was deployed into | diff --git a/arm/Microsoft.ManagedIdentity/userAssignedIdentities/deploy.bicep b/arm/Microsoft.ManagedIdentity/userAssignedIdentities/deploy.bicep index 16001af371..e60c093e4a 100644 --- a/arm/Microsoft.ManagedIdentity/userAssignedIdentities/deploy.bicep +++ b/arm/Microsoft.ManagedIdentity/userAssignedIdentities/deploy.bicep @@ -70,3 +70,6 @@ output principalId string = userMsi.properties.principalId @description('The resource group the user assigned identity was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = userMsi.location diff --git a/arm/Microsoft.ManagedIdentity/userAssignedIdentities/readme.md b/arm/Microsoft.ManagedIdentity/userAssignedIdentities/readme.md index ee1554bbc0..0f114ac7c1 100644 --- a/arm/Microsoft.ManagedIdentity/userAssignedIdentities/readme.md +++ b/arm/Microsoft.ManagedIdentity/userAssignedIdentities/readme.md @@ -76,6 +76,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the user assigned identity. | | `principalId` | string | The principal ID of the user assigned identity. | | `resourceGroupName` | string | The resource group the user assigned identity was deployed into. | diff --git a/arm/Microsoft.NetApp/netAppAccounts/capacityPools/deploy.bicep b/arm/Microsoft.NetApp/netAppAccounts/capacityPools/deploy.bicep index 2759d4fab2..e093b1db13 100644 --- a/arm/Microsoft.NetApp/netAppAccounts/capacityPools/deploy.bicep +++ b/arm/Microsoft.NetApp/netAppAccounts/capacityPools/deploy.bicep @@ -108,3 +108,6 @@ output resourceId string = capacityPool.id @description('The name of the Resource Group the Capacity Pool was created in.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = capacityPool.location diff --git a/arm/Microsoft.NetApp/netAppAccounts/capacityPools/readme.md b/arm/Microsoft.NetApp/netAppAccounts/capacityPools/readme.md index eb6671de63..d267d1f1c8 100644 --- a/arm/Microsoft.NetApp/netAppAccounts/capacityPools/readme.md +++ b/arm/Microsoft.NetApp/netAppAccounts/capacityPools/readme.md @@ -89,6 +89,7 @@ Create a role assignment for the given resource. If you want to assign a service | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the Capacity Pool. | | `resourceGroupName` | string | The name of the Resource Group the Capacity Pool was created in. | | `resourceId` | string | The resource ID of the Capacity Pool. | diff --git a/arm/Microsoft.NetApp/netAppAccounts/capacityPools/volumes/deploy.bicep b/arm/Microsoft.NetApp/netAppAccounts/capacityPools/volumes/deploy.bicep index cfbc79aef7..efc2a05185 100644 --- a/arm/Microsoft.NetApp/netAppAccounts/capacityPools/volumes/deploy.bicep +++ b/arm/Microsoft.NetApp/netAppAccounts/capacityPools/volumes/deploy.bicep @@ -95,3 +95,6 @@ output resourceId string = volume.id @description('The name of the Resource Group the Volume was created in.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = volume.location diff --git a/arm/Microsoft.NetApp/netAppAccounts/capacityPools/volumes/readme.md b/arm/Microsoft.NetApp/netAppAccounts/capacityPools/volumes/readme.md index 5443fcffa3..7071166660 100644 --- a/arm/Microsoft.NetApp/netAppAccounts/capacityPools/volumes/readme.md +++ b/arm/Microsoft.NetApp/netAppAccounts/capacityPools/volumes/readme.md @@ -72,6 +72,7 @@ Create a role assignment for the given resource. If you want to assign a service | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the Volume. | | `resourceGroupName` | string | The name of the Resource Group the Volume was created in. | | `resourceId` | string | The Resource ID of the Volume. | diff --git a/arm/Microsoft.NetApp/netAppAccounts/deploy.bicep b/arm/Microsoft.NetApp/netAppAccounts/deploy.bicep index 2ac0bbae47..01848e0184 100644 --- a/arm/Microsoft.NetApp/netAppAccounts/deploy.bicep +++ b/arm/Microsoft.NetApp/netAppAccounts/deploy.bicep @@ -119,3 +119,6 @@ output resourceId string = netAppAccount.id @description('The name of the Resource Group the NetApp account was created in.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = netAppAccount.location diff --git a/arm/Microsoft.NetApp/netAppAccounts/readme.md b/arm/Microsoft.NetApp/netAppAccounts/readme.md index 38ef055926..ea58a2cdce 100644 --- a/arm/Microsoft.NetApp/netAppAccounts/readme.md +++ b/arm/Microsoft.NetApp/netAppAccounts/readme.md @@ -89,6 +89,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the NetApp account. | | `resourceGroupName` | string | The name of the Resource Group the NetApp account was created in. | | `resourceId` | string | The Resource ID of the NetApp account. | diff --git a/arm/Microsoft.Network/applicationGateways/deploy.bicep b/arm/Microsoft.Network/applicationGateways/deploy.bicep index c98cdf8ac5..cb065b0485 100644 --- a/arm/Microsoft.Network/applicationGateways/deploy.bicep +++ b/arm/Microsoft.Network/applicationGateways/deploy.bicep @@ -361,3 +361,6 @@ output resourceId string = applicationGateway.id @description('The resource group the application gateway was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = applicationGateway.location diff --git a/arm/Microsoft.Network/applicationGateways/readme.md b/arm/Microsoft.Network/applicationGateways/readme.md index 9e9e443b17..74f0f9c154 100644 --- a/arm/Microsoft.Network/applicationGateways/readme.md +++ b/arm/Microsoft.Network/applicationGateways/readme.md @@ -674,6 +674,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the application gateway. | | `resourceGroupName` | string | The resource group the application gateway was deployed into. | | `resourceId` | string | The resource ID of the application gateway. | diff --git a/arm/Microsoft.Network/applicationSecurityGroups/deploy.bicep b/arm/Microsoft.Network/applicationSecurityGroups/deploy.bicep index 5c450cbdba..844e47bb2f 100644 --- a/arm/Microsoft.Network/applicationSecurityGroups/deploy.bicep +++ b/arm/Microsoft.Network/applicationSecurityGroups/deploy.bicep @@ -68,3 +68,6 @@ output resourceId string = applicationSecurityGroup.id @description('The name of the application security group.') output name string = applicationSecurityGroup.name + +@description('The location the resource was deployed into.') +output location string = applicationSecurityGroup.location diff --git a/arm/Microsoft.Network/applicationSecurityGroups/readme.md b/arm/Microsoft.Network/applicationSecurityGroups/readme.md index 3350a4c0d9..4affbc2d1d 100644 --- a/arm/Microsoft.Network/applicationSecurityGroups/readme.md +++ b/arm/Microsoft.Network/applicationSecurityGroups/readme.md @@ -80,6 +80,7 @@ Create a role assignment for the given resource. If you want to assign a service | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the application security group. | | `resourceGroupName` | string | The resource group the application security group was deployed into. | | `resourceId` | string | The resource ID of the application security group. | diff --git a/arm/Microsoft.Network/azureFirewalls/deploy.bicep b/arm/Microsoft.Network/azureFirewalls/deploy.bicep index 4e15e5fdec..068f42094e 100644 --- a/arm/Microsoft.Network/azureFirewalls/deploy.bicep +++ b/arm/Microsoft.Network/azureFirewalls/deploy.bicep @@ -222,3 +222,6 @@ output networkRuleCollections array = networkRuleCollections @description('Collection of NAT rule collections used by Azure Firewall.') output natRuleCollections array = natRuleCollections + +@description('The location the resource was deployed into.') +output location string = azureFirewall.location diff --git a/arm/Microsoft.Network/azureFirewalls/readme.md b/arm/Microsoft.Network/azureFirewalls/readme.md index d6e707ed4a..a7f7302378 100644 --- a/arm/Microsoft.Network/azureFirewalls/readme.md +++ b/arm/Microsoft.Network/azureFirewalls/readme.md @@ -100,6 +100,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | | `applicationRuleCollections` | array | List of Application Rule Collections. | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the Azure firewall. | | `natRuleCollections` | array | Collection of NAT rule collections used by Azure Firewall. | | `networkRuleCollections` | array | List of Network Rule Collections. | diff --git a/arm/Microsoft.Network/bastionHosts/deploy.bicep b/arm/Microsoft.Network/bastionHosts/deploy.bicep index c6475ae0a1..e8593a831e 100644 --- a/arm/Microsoft.Network/bastionHosts/deploy.bicep +++ b/arm/Microsoft.Network/bastionHosts/deploy.bicep @@ -195,3 +195,6 @@ output name string = azureBastion.name @description('The resource ID the Azure Bastion.') output resourceId string = azureBastion.id + +@description('The location the resource was deployed into.') +output location string = azureBastion.location diff --git a/arm/Microsoft.Network/bastionHosts/readme.md b/arm/Microsoft.Network/bastionHosts/readme.md index 62411b13da..83ff60f876 100644 --- a/arm/Microsoft.Network/bastionHosts/readme.md +++ b/arm/Microsoft.Network/bastionHosts/readme.md @@ -94,6 +94,7 @@ Create a role assignment for the given resource. If you want to assign a service | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name the Azure Bastion. | | `resourceGroupName` | string | The resource group the Azure Bastion was deployed into. | | `resourceId` | string | The resource ID the Azure Bastion. | diff --git a/arm/Microsoft.Network/connections/deploy.bicep b/arm/Microsoft.Network/connections/deploy.bicep index a014e74dfb..5868b71a6a 100644 --- a/arm/Microsoft.Network/connections/deploy.bicep +++ b/arm/Microsoft.Network/connections/deploy.bicep @@ -123,3 +123,6 @@ output name string = connection.name @description('The resource ID of the remote connection.') output resourceId string = connection.id + +@description('The location the resource was deployed into.') +output location string = connection.location diff --git a/arm/Microsoft.Network/connections/readme.md b/arm/Microsoft.Network/connections/readme.md index 2697cab1ff..370196469c 100644 --- a/arm/Microsoft.Network/connections/readme.md +++ b/arm/Microsoft.Network/connections/readme.md @@ -138,6 +138,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the remote connection. | | `resourceGroupName` | string | The resource group the remote connection was deployed into. | | `resourceId` | string | The resource ID of the remote connection. | diff --git a/arm/Microsoft.Network/ddosProtectionPlans/deploy.bicep b/arm/Microsoft.Network/ddosProtectionPlans/deploy.bicep index 3c8dfc45dc..a1006d95f9 100644 --- a/arm/Microsoft.Network/ddosProtectionPlans/deploy.bicep +++ b/arm/Microsoft.Network/ddosProtectionPlans/deploy.bicep @@ -69,3 +69,6 @@ output resourceId string = ddosProtectionPlan.id @description('The name of the DDOS protection plan.') output name string = ddosProtectionPlan.name + +@description('The location the resource was deployed into.') +output location string = ddosProtectionPlan.location diff --git a/arm/Microsoft.Network/ddosProtectionPlans/readme.md b/arm/Microsoft.Network/ddosProtectionPlans/readme.md index 09c3221b9d..033a9534aa 100644 --- a/arm/Microsoft.Network/ddosProtectionPlans/readme.md +++ b/arm/Microsoft.Network/ddosProtectionPlans/readme.md @@ -80,6 +80,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the DDOS protection plan. | | `resourceGroupName` | string | The resource group the DDOS protection plan was deployed into. | | `resourceId` | string | The resource ID of the DDOS protection plan. | diff --git a/arm/Microsoft.Network/expressRouteCircuits/deploy.bicep b/arm/Microsoft.Network/expressRouteCircuits/deploy.bicep index 5443518381..591a386f46 100644 --- a/arm/Microsoft.Network/expressRouteCircuits/deploy.bicep +++ b/arm/Microsoft.Network/expressRouteCircuits/deploy.bicep @@ -218,3 +218,6 @@ output name string = expressRouteCircuits.name @description('The service key of the express route circuit.') output serviceKey string = reference(expressRouteCircuits.id, '2021-02-01').serviceKey + +@description('The location the resource was deployed into.') +output location string = expressRouteCircuits.location diff --git a/arm/Microsoft.Network/expressRouteCircuits/readme.md b/arm/Microsoft.Network/expressRouteCircuits/readme.md index 1138777533..127a51e5fb 100644 --- a/arm/Microsoft.Network/expressRouteCircuits/readme.md +++ b/arm/Microsoft.Network/expressRouteCircuits/readme.md @@ -101,6 +101,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of express route curcuit. | | `resourceGroupName` | string | The resource group the express route curcuit was deployed into. | | `resourceId` | string | The resource ID of express route curcuit. | diff --git a/arm/Microsoft.Network/firewallPolicies/deploy.bicep b/arm/Microsoft.Network/firewallPolicies/deploy.bicep index ff2a84c493..f915f02e33 100644 --- a/arm/Microsoft.Network/firewallPolicies/deploy.bicep +++ b/arm/Microsoft.Network/firewallPolicies/deploy.bicep @@ -177,3 +177,6 @@ output resourceId string = firewallPolicy.id @description('The resource group of the deployed firewall policy.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = firewallPolicy.location diff --git a/arm/Microsoft.Network/firewallPolicies/readme.md b/arm/Microsoft.Network/firewallPolicies/readme.md index 526ec7f27c..04d9bff069 100644 --- a/arm/Microsoft.Network/firewallPolicies/readme.md +++ b/arm/Microsoft.Network/firewallPolicies/readme.md @@ -84,6 +84,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed firewall policy. | | `resourceGroupName` | string | The resource group of the deployed firewall policy. | | `resourceId` | string | The resource ID of the deployed firewall policy. | diff --git a/arm/Microsoft.Network/ipGroups/deploy.bicep b/arm/Microsoft.Network/ipGroups/deploy.bicep index fd3a60457e..c9a4c54e45 100644 --- a/arm/Microsoft.Network/ipGroups/deploy.bicep +++ b/arm/Microsoft.Network/ipGroups/deploy.bicep @@ -74,3 +74,6 @@ output resourceGroupName string = resourceGroup().name @description('The name of the IP group.') output name string = ipGroup.name + +@description('The location the resource was deployed into.') +output location string = ipGroup.location diff --git a/arm/Microsoft.Network/ipGroups/readme.md b/arm/Microsoft.Network/ipGroups/readme.md index b5d1f77a58..06262d63e8 100644 --- a/arm/Microsoft.Network/ipGroups/readme.md +++ b/arm/Microsoft.Network/ipGroups/readme.md @@ -81,6 +81,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the IP group. | | `resourceGroupName` | string | The resource group of the IP group was deployed into. | | `resourceId` | string | The resource ID of the IP group. | diff --git a/arm/Microsoft.Network/loadBalancers/deploy.bicep b/arm/Microsoft.Network/loadBalancers/deploy.bicep index c48b9be562..72d9b58379 100644 --- a/arm/Microsoft.Network/loadBalancers/deploy.bicep +++ b/arm/Microsoft.Network/loadBalancers/deploy.bicep @@ -266,3 +266,6 @@ output resourceGroupName string = resourceGroup().name @description('The backend address pools available in the load balancer.') output backendpools array = loadBalancer.properties.backendAddressPools + +@description('The location the resource was deployed into.') +output location string = loadBalancer.location diff --git a/arm/Microsoft.Network/loadBalancers/readme.md b/arm/Microsoft.Network/loadBalancers/readme.md index fbf82dd202..b100bb4921 100644 --- a/arm/Microsoft.Network/loadBalancers/readme.md +++ b/arm/Microsoft.Network/loadBalancers/readme.md @@ -228,6 +228,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | | `backendpools` | array | The backend address pools available in the load balancer. | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the load balancer. | | `resourceGroupName` | string | The resource group the load balancer was deployed into. | | `resourceId` | string | The resource ID of the load balancer. | diff --git a/arm/Microsoft.Network/localNetworkGateways/deploy.bicep b/arm/Microsoft.Network/localNetworkGateways/deploy.bicep index 144e9b1082..0957133b2a 100644 --- a/arm/Microsoft.Network/localNetworkGateways/deploy.bicep +++ b/arm/Microsoft.Network/localNetworkGateways/deploy.bicep @@ -100,3 +100,6 @@ output resourceGroupName string = resourceGroup().name @description('The name of the local network gateway.') output name string = localNetworkGateway.name + +@description('The location the resource was deployed into.') +output location string = localNetworkGateway.location diff --git a/arm/Microsoft.Network/localNetworkGateways/readme.md b/arm/Microsoft.Network/localNetworkGateways/readme.md index a716027f3f..6751d040b4 100644 --- a/arm/Microsoft.Network/localNetworkGateways/readme.md +++ b/arm/Microsoft.Network/localNetworkGateways/readme.md @@ -86,6 +86,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the local network gateway. | | `resourceGroupName` | string | The resource group the local network gateway was deployed into. | | `resourceId` | string | The resource ID of the local network gateway. | diff --git a/arm/Microsoft.Network/natGateways/deploy.bicep b/arm/Microsoft.Network/natGateways/deploy.bicep index 928bcecb7f..d026761804 100644 --- a/arm/Microsoft.Network/natGateways/deploy.bicep +++ b/arm/Microsoft.Network/natGateways/deploy.bicep @@ -212,3 +212,6 @@ output resourceId string = natGateway.id @description('The resource group the NAT Gateway was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = natGateway.location diff --git a/arm/Microsoft.Network/natGateways/readme.md b/arm/Microsoft.Network/natGateways/readme.md index 5ddf76b54b..b0dc07a355 100644 --- a/arm/Microsoft.Network/natGateways/readme.md +++ b/arm/Microsoft.Network/natGateways/readme.md @@ -98,6 +98,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the NAT Gateway. | | `resourceGroupName` | string | The resource group the NAT Gateway was deployed into. | | `resourceId` | string | The resource ID of the NAT Gateway. | diff --git a/arm/Microsoft.Network/networkSecurityGroups/deploy.bicep b/arm/Microsoft.Network/networkSecurityGroups/deploy.bicep index ffde34fb24..c525d95d3a 100644 --- a/arm/Microsoft.Network/networkSecurityGroups/deploy.bicep +++ b/arm/Microsoft.Network/networkSecurityGroups/deploy.bicep @@ -167,3 +167,6 @@ output resourceId string = networkSecurityGroup.id @description('The name of the network security group.') output name string = networkSecurityGroup.name + +@description('The location the resource was deployed into.') +output location string = networkSecurityGroup.location diff --git a/arm/Microsoft.Network/networkSecurityGroups/readme.md b/arm/Microsoft.Network/networkSecurityGroups/readme.md index daeba8ff3f..a02ef7524d 100644 --- a/arm/Microsoft.Network/networkSecurityGroups/readme.md +++ b/arm/Microsoft.Network/networkSecurityGroups/readme.md @@ -90,6 +90,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the network security group. | | `resourceGroupName` | string | The resource group the network security group was deployed into. | | `resourceId` | string | The resource ID of the network security group. | diff --git a/arm/Microsoft.Network/networkWatchers/connectionMonitors/deploy.bicep b/arm/Microsoft.Network/networkWatchers/connectionMonitors/deploy.bicep index 037fbe9af8..ac2358bc09 100644 --- a/arm/Microsoft.Network/networkWatchers/connectionMonitors/deploy.bicep +++ b/arm/Microsoft.Network/networkWatchers/connectionMonitors/deploy.bicep @@ -71,3 +71,6 @@ output resourceId string = connectionMonitor.id @description('The resource group the connection monitor was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = connectionMonitor.location diff --git a/arm/Microsoft.Network/networkWatchers/connectionMonitors/readme.md b/arm/Microsoft.Network/networkWatchers/connectionMonitors/readme.md index 0029c14ea5..9d17cdf1ee 100644 --- a/arm/Microsoft.Network/networkWatchers/connectionMonitors/readme.md +++ b/arm/Microsoft.Network/networkWatchers/connectionMonitors/readme.md @@ -51,6 +51,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed connection monitor. | | `resourceGroupName` | string | The resource group the connection monitor was deployed into. | | `resourceId` | string | The resource ID of the deployed connection monitor. | diff --git a/arm/Microsoft.Network/networkWatchers/deploy.bicep b/arm/Microsoft.Network/networkWatchers/deploy.bicep index fc565b6247..6db545408e 100644 --- a/arm/Microsoft.Network/networkWatchers/deploy.bicep +++ b/arm/Microsoft.Network/networkWatchers/deploy.bicep @@ -105,3 +105,6 @@ output resourceId string = networkWatcher.id @description('The resource group the network watcher was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = networkWatcher.location diff --git a/arm/Microsoft.Network/networkWatchers/flowLogs/deploy.bicep b/arm/Microsoft.Network/networkWatchers/flowLogs/deploy.bicep index efb8073d7b..6b35370156 100644 --- a/arm/Microsoft.Network/networkWatchers/flowLogs/deploy.bicep +++ b/arm/Microsoft.Network/networkWatchers/flowLogs/deploy.bicep @@ -100,3 +100,6 @@ output resourceId string = flowLog.id @description('The resource group the flow log was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = flowLog.location diff --git a/arm/Microsoft.Network/networkWatchers/flowLogs/readme.md b/arm/Microsoft.Network/networkWatchers/flowLogs/readme.md index d8a97d4217..3ed1f0920c 100644 --- a/arm/Microsoft.Network/networkWatchers/flowLogs/readme.md +++ b/arm/Microsoft.Network/networkWatchers/flowLogs/readme.md @@ -59,6 +59,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the flow log. | | `resourceGroupName` | string | The resource group the flow log was deployed into. | | `resourceId` | string | The resource ID of the flow log. | diff --git a/arm/Microsoft.Network/networkWatchers/readme.md b/arm/Microsoft.Network/networkWatchers/readme.md index 07be75a583..88e99c31dd 100644 --- a/arm/Microsoft.Network/networkWatchers/readme.md +++ b/arm/Microsoft.Network/networkWatchers/readme.md @@ -84,6 +84,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed network watcher. | | `resourceGroupName` | string | The resource group the network watcher was deployed into. | | `resourceId` | string | The resource ID of the deployed network watcher. | diff --git a/arm/Microsoft.Network/privateDnsZones/deploy.bicep b/arm/Microsoft.Network/privateDnsZones/deploy.bicep index 913013552d..bf31e73043 100644 --- a/arm/Microsoft.Network/privateDnsZones/deploy.bicep +++ b/arm/Microsoft.Network/privateDnsZones/deploy.bicep @@ -211,3 +211,6 @@ output name string = privateDnsZone.name @description('The resource ID of the private DNS zone.') output resourceId string = privateDnsZone.id + +@description('The location the resource was deployed into.') +output location string = privateDnsZone.location diff --git a/arm/Microsoft.Network/privateDnsZones/readme.md b/arm/Microsoft.Network/privateDnsZones/readme.md index 771f16fa95..b92f41a406 100644 --- a/arm/Microsoft.Network/privateDnsZones/readme.md +++ b/arm/Microsoft.Network/privateDnsZones/readme.md @@ -98,6 +98,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the private DNS zone. | | `resourceGroupName` | string | The resource group the private DNS zone was deployed into. | | `resourceId` | string | The resource ID of the private DNS zone. | diff --git a/arm/Microsoft.Network/privateDnsZones/virtualNetworkLinks/deploy.bicep b/arm/Microsoft.Network/privateDnsZones/virtualNetworkLinks/deploy.bicep index 3f7011834d..15962527f0 100644 --- a/arm/Microsoft.Network/privateDnsZones/virtualNetworkLinks/deploy.bicep +++ b/arm/Microsoft.Network/privateDnsZones/virtualNetworkLinks/deploy.bicep @@ -56,3 +56,6 @@ output resourceId string = virtualNetworkLink.id @description('The resource group of the deployed virtual network link.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = virtualNetworkLink.location diff --git a/arm/Microsoft.Network/privateDnsZones/virtualNetworkLinks/readme.md b/arm/Microsoft.Network/privateDnsZones/virtualNetworkLinks/readme.md index fd06d239f7..62078c1446 100644 --- a/arm/Microsoft.Network/privateDnsZones/virtualNetworkLinks/readme.md +++ b/arm/Microsoft.Network/privateDnsZones/virtualNetworkLinks/readme.md @@ -57,6 +57,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed virtual network link. | | `resourceGroupName` | string | The resource group of the deployed virtual network link. | | `resourceId` | string | The resource ID of the deployed virtual network link. | diff --git a/arm/Microsoft.Network/privateEndpoints/deploy.bicep b/arm/Microsoft.Network/privateEndpoints/deploy.bicep index bd1538492d..008cdb48af 100644 --- a/arm/Microsoft.Network/privateEndpoints/deploy.bicep +++ b/arm/Microsoft.Network/privateEndpoints/deploy.bicep @@ -104,3 +104,6 @@ output resourceId string = privateEndpoint.id @description('The name of the private endpoint.') output name string = privateEndpoint.name + +@description('The location the resource was deployed into.') +output location string = privateEndpoint.location diff --git a/arm/Microsoft.Network/privateEndpoints/readme.md b/arm/Microsoft.Network/privateEndpoints/readme.md index 81e9dc220c..e7b42d3174 100644 --- a/arm/Microsoft.Network/privateEndpoints/readme.md +++ b/arm/Microsoft.Network/privateEndpoints/readme.md @@ -95,6 +95,7 @@ Create a role assignment for the given resource. If you want to assign a service | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the private endpoint. | | `resourceGroupName` | string | The resource group the private endpoint was deployed into. | | `resourceId` | string | The resource ID of the private endpoint. | diff --git a/arm/Microsoft.Network/publicIPAddresses/deploy.bicep b/arm/Microsoft.Network/publicIPAddresses/deploy.bicep index 22844b5472..031eded83e 100644 --- a/arm/Microsoft.Network/publicIPAddresses/deploy.bicep +++ b/arm/Microsoft.Network/publicIPAddresses/deploy.bicep @@ -192,3 +192,6 @@ output resourceId string = publicIpAddress.id @description('The public IP address of the public IP address resource.') output ipAddress string = publicIpAddress.properties.ipAddress + +@description('The location the resource was deployed into.') +output location string = publicIpAddress.location diff --git a/arm/Microsoft.Network/publicIPAddresses/readme.md b/arm/Microsoft.Network/publicIPAddresses/readme.md index 93389d8243..a106bacd8c 100644 --- a/arm/Microsoft.Network/publicIPAddresses/readme.md +++ b/arm/Microsoft.Network/publicIPAddresses/readme.md @@ -94,6 +94,7 @@ Create a role assignment for the given resource. If you want to assign a service | Output Name | Type | Description | | :-- | :-- | :-- | | `ipAddress` | string | The public IP address of the public IP address resource. | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the public IP address. | | `resourceGroupName` | string | The resource group the public IP address was deployed into. | | `resourceId` | string | The resource ID of the public IP address. | diff --git a/arm/Microsoft.Network/publicIPPrefixes/deploy.bicep b/arm/Microsoft.Network/publicIPPrefixes/deploy.bicep index 22074ff112..0af3d87a67 100644 --- a/arm/Microsoft.Network/publicIPPrefixes/deploy.bicep +++ b/arm/Microsoft.Network/publicIPPrefixes/deploy.bicep @@ -80,3 +80,6 @@ output resourceGroupName string = resourceGroup().name @description('The name of the public IP prefix.') output name string = publicIpPrefix.name + +@description('The location the resource was deployed into.') +output location string = publicIpPrefix.location diff --git a/arm/Microsoft.Network/publicIPPrefixes/readme.md b/arm/Microsoft.Network/publicIPPrefixes/readme.md index c1b7f5e3d3..4eb7452f5b 100644 --- a/arm/Microsoft.Network/publicIPPrefixes/readme.md +++ b/arm/Microsoft.Network/publicIPPrefixes/readme.md @@ -81,6 +81,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the public IP prefix. | | `resourceGroupName` | string | The resource group the public IP prefix was deployed into. | | `resourceId` | string | The resource ID of the public IP prefix. | diff --git a/arm/Microsoft.Network/routeTables/deploy.bicep b/arm/Microsoft.Network/routeTables/deploy.bicep index c6ebd7b4b5..3f493639de 100644 --- a/arm/Microsoft.Network/routeTables/deploy.bicep +++ b/arm/Microsoft.Network/routeTables/deploy.bicep @@ -77,3 +77,6 @@ output name string = routeTable.name @description('The resource ID of the route table.') output resourceId string = routeTable.id + +@description('The location the resource was deployed into.') +output location string = routeTable.location diff --git a/arm/Microsoft.Network/routeTables/readme.md b/arm/Microsoft.Network/routeTables/readme.md index da9e4010a9..6f5057be52 100644 --- a/arm/Microsoft.Network/routeTables/readme.md +++ b/arm/Microsoft.Network/routeTables/readme.md @@ -124,6 +124,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the route table. | | `resourceGroupName` | string | The resource group the route table was deployed into. | | `resourceId` | string | The resource ID of the route table. | diff --git a/arm/Microsoft.Network/virtualHubs/deploy.bicep b/arm/Microsoft.Network/virtualHubs/deploy.bicep index 5af207a5f1..9009170726 100644 --- a/arm/Microsoft.Network/virtualHubs/deploy.bicep +++ b/arm/Microsoft.Network/virtualHubs/deploy.bicep @@ -171,3 +171,6 @@ output resourceId string = virtualHub.id @description('The name of the virtual hub.') output name string = virtualHub.name + +@description('The location the resource was deployed into.') +output location string = virtualHub.location diff --git a/arm/Microsoft.Network/virtualHubs/readme.md b/arm/Microsoft.Network/virtualHubs/readme.md index ac716a5660..dd33b4f150 100644 --- a/arm/Microsoft.Network/virtualHubs/readme.md +++ b/arm/Microsoft.Network/virtualHubs/readme.md @@ -71,6 +71,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the virtual hub. | | `resourceGroupName` | string | The resource group the virtual hub was deployed into. | | `resourceId` | string | The resource ID of the virtual hub. | diff --git a/arm/Microsoft.Network/virtualNetworkGateways/deploy.bicep b/arm/Microsoft.Network/virtualNetworkGateways/deploy.bicep index 9bf15d588c..ca9369f1a2 100644 --- a/arm/Microsoft.Network/virtualNetworkGateways/deploy.bicep +++ b/arm/Microsoft.Network/virtualNetworkGateways/deploy.bicep @@ -406,3 +406,6 @@ output resourceId string = virtualNetworkGateway.id @description('Shows if the virtual network gateway is configured in active-active mode.') output activeActive bool = virtualNetworkGateway.properties.activeActive + +@description('The location the resource was deployed into.') +output location string = virtualNetworkGateway.location diff --git a/arm/Microsoft.Network/virtualNetworkGateways/readme.md b/arm/Microsoft.Network/virtualNetworkGateways/readme.md index f535b75645..73705c85f9 100644 --- a/arm/Microsoft.Network/virtualNetworkGateways/readme.md +++ b/arm/Microsoft.Network/virtualNetworkGateways/readme.md @@ -139,6 +139,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | | `activeActive` | bool | Shows if the virtual network gateway is configured in active-active mode. | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the virtual network gateway. | | `resourceGroupName` | string | The resource group the virtual network gateway was deployed. | | `resourceId` | string | The resource ID of the virtual network gateway. | diff --git a/arm/Microsoft.Network/virtualNetworks/deploy.bicep b/arm/Microsoft.Network/virtualNetworks/deploy.bicep index 7bef007f89..d5bfb59410 100644 --- a/arm/Microsoft.Network/virtualNetworks/deploy.bicep +++ b/arm/Microsoft.Network/virtualNetworks/deploy.bicep @@ -257,3 +257,6 @@ output subnetNames array = [for subnet in subnets: subnet.name] @description('The resource IDs of the deployed subnets.') output subnetResourceIds array = [for subnet in subnets: az.resourceId('Microsoft.Network/virtualNetworks/subnets', name, subnet.name)] + +@description('The location the resource was deployed into.') +output location string = virtualNetwork.location diff --git a/arm/Microsoft.Network/virtualNetworks/readme.md b/arm/Microsoft.Network/virtualNetworks/readme.md index 057b206ffc..8785d4e965 100644 --- a/arm/Microsoft.Network/virtualNetworks/readme.md +++ b/arm/Microsoft.Network/virtualNetworks/readme.md @@ -186,6 +186,7 @@ The network security group and route table resources must reside in the same res | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the virtual network. | | `resourceGroupName` | string | The resource group the virtual network was deployed into. | | `resourceId` | string | The resource ID of the virtual network. | diff --git a/arm/Microsoft.Network/virtualWans/deploy.bicep b/arm/Microsoft.Network/virtualWans/deploy.bicep index 45f145882e..ee927daf3c 100644 --- a/arm/Microsoft.Network/virtualWans/deploy.bicep +++ b/arm/Microsoft.Network/virtualWans/deploy.bicep @@ -89,3 +89,6 @@ output resourceId string = virtualWan.id @description('The resource group the virtual WAN was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = virtualWan.location diff --git a/arm/Microsoft.Network/virtualWans/readme.md b/arm/Microsoft.Network/virtualWans/readme.md index 6e1fc13427..356f2f7058 100644 --- a/arm/Microsoft.Network/virtualWans/readme.md +++ b/arm/Microsoft.Network/virtualWans/readme.md @@ -84,6 +84,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the virtual WAN. | | `resourceGroupName` | string | The resource group the virtual WAN was deployed into. | | `resourceId` | string | The resource ID of the virtual WAN. | diff --git a/arm/Microsoft.Network/vpnGateways/deploy.bicep b/arm/Microsoft.Network/vpnGateways/deploy.bicep index df1447f66d..a598b12aa4 100644 --- a/arm/Microsoft.Network/vpnGateways/deploy.bicep +++ b/arm/Microsoft.Network/vpnGateways/deploy.bicep @@ -117,3 +117,6 @@ output resourceId string = vpnGateway.id @description('The name of the resource group the VPN gateway was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = vpnGateway.location diff --git a/arm/Microsoft.Network/vpnGateways/readme.md b/arm/Microsoft.Network/vpnGateways/readme.md index e04f063bc2..b09a597fe3 100644 --- a/arm/Microsoft.Network/vpnGateways/readme.md +++ b/arm/Microsoft.Network/vpnGateways/readme.md @@ -96,6 +96,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the VPN gateway. | | `resourceGroupName` | string | The name of the resource group the VPN gateway was deployed into. | | `resourceId` | string | The resource ID of the VPN gateway. | diff --git a/arm/Microsoft.Network/vpnSites/deploy.bicep b/arm/Microsoft.Network/vpnSites/deploy.bicep index 8911a52919..333b81739f 100644 --- a/arm/Microsoft.Network/vpnSites/deploy.bicep +++ b/arm/Microsoft.Network/vpnSites/deploy.bicep @@ -103,3 +103,6 @@ output resourceId string = vpnSite.id @description('The resource group the VPN site was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = vpnSite.location diff --git a/arm/Microsoft.Network/vpnSites/readme.md b/arm/Microsoft.Network/vpnSites/readme.md index 7d68663326..ef054dc311 100644 --- a/arm/Microsoft.Network/vpnSites/readme.md +++ b/arm/Microsoft.Network/vpnSites/readme.md @@ -153,6 +153,7 @@ Create a role assignment for the given resource. If you want to assign a service | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the VPN site. | | `resourceGroupName` | string | The resource group the VPN site was deployed into. | | `resourceId` | string | The resource ID of the VPN site. | diff --git a/arm/Microsoft.OperationalInsights/workspaces/deploy.bicep b/arm/Microsoft.OperationalInsights/workspaces/deploy.bicep index f5469c8138..64236db979 100644 --- a/arm/Microsoft.OperationalInsights/workspaces/deploy.bicep +++ b/arm/Microsoft.OperationalInsights/workspaces/deploy.bicep @@ -274,3 +274,6 @@ output name string = logAnalyticsWorkspace.name @description('The ID associated with the workspace.') output logAnalyticsWorkspaceId string = logAnalyticsWorkspace.properties.customerId + +@description('The location the resource was deployed into.') +output location string = logAnalyticsWorkspace.location diff --git a/arm/Microsoft.OperationalInsights/workspaces/readme.md b/arm/Microsoft.OperationalInsights/workspaces/readme.md index 82a233af4d..8a2998dcd2 100644 --- a/arm/Microsoft.OperationalInsights/workspaces/readme.md +++ b/arm/Microsoft.OperationalInsights/workspaces/readme.md @@ -235,6 +235,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `logAnalyticsWorkspaceId` | string | The ID associated with the workspace. | | `name` | string | The name of the deployed log analytics workspace. | | `resourceGroupName` | string | The resource group of the deployed log analytics workspace. | diff --git a/arm/Microsoft.RecoveryServices/vaults/deploy.bicep b/arm/Microsoft.RecoveryServices/vaults/deploy.bicep index ac68b0a883..23a79ff477 100644 --- a/arm/Microsoft.RecoveryServices/vaults/deploy.bicep +++ b/arm/Microsoft.RecoveryServices/vaults/deploy.bicep @@ -279,3 +279,6 @@ output name string = rsv.name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(rsv.identity, 'principalId') ? rsv.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = rsv.location diff --git a/arm/Microsoft.RecoveryServices/vaults/readme.md b/arm/Microsoft.RecoveryServices/vaults/readme.md index ea24de3189..155664ad68 100644 --- a/arm/Microsoft.RecoveryServices/vaults/readme.md +++ b/arm/Microsoft.RecoveryServices/vaults/readme.md @@ -423,6 +423,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The Name of the recovery services vault. | | `resourceGroupName` | string | The name of the resource group the recovery services vault was created in. | | `resourceId` | string | The resource ID of the recovery services vault. | diff --git a/arm/Microsoft.RecoveryServices/vaults/replicationFabrics/deploy.bicep b/arm/Microsoft.RecoveryServices/vaults/replicationFabrics/deploy.bicep index 333d613f32..a1e22d501a 100644 --- a/arm/Microsoft.RecoveryServices/vaults/replicationFabrics/deploy.bicep +++ b/arm/Microsoft.RecoveryServices/vaults/replicationFabrics/deploy.bicep @@ -57,3 +57,6 @@ output resourceId string = replicationFabric.id @description('The name of the resource group the replication fabric was created in.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = replicationFabric.location diff --git a/arm/Microsoft.RecoveryServices/vaults/replicationFabrics/readme.md b/arm/Microsoft.RecoveryServices/vaults/replicationFabrics/readme.md index 2935a71bf8..021fcf5aea 100644 --- a/arm/Microsoft.RecoveryServices/vaults/replicationFabrics/readme.md +++ b/arm/Microsoft.RecoveryServices/vaults/replicationFabrics/readme.md @@ -63,6 +63,7 @@ This module deploys a Replication Fabric for Azure to Azure disaster recovery sc | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the replication fabric. | | `resourceGroupName` | string | The name of the resource group the replication fabric was created in. | | `resourceId` | string | The resource ID of the replication fabric. | diff --git a/arm/Microsoft.Resources/deploymentScripts/deploy.bicep b/arm/Microsoft.Resources/deploymentScripts/deploy.bicep index 514d5343fd..a221e96143 100644 --- a/arm/Microsoft.Resources/deploymentScripts/deploy.bicep +++ b/arm/Microsoft.Resources/deploymentScripts/deploy.bicep @@ -134,3 +134,6 @@ output resourceGroupName string = resourceGroup().name @description('The name of the deployment script.') output name string = deploymentScript.name + +@description('The location the resource was deployed into.') +output location string = deploymentScript.location diff --git a/arm/Microsoft.Resources/deploymentScripts/readme.md b/arm/Microsoft.Resources/deploymentScripts/readme.md index e4950859e6..42a08fecd5 100644 --- a/arm/Microsoft.Resources/deploymentScripts/readme.md +++ b/arm/Microsoft.Resources/deploymentScripts/readme.md @@ -85,6 +85,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployment script. | | `resourceGroupName` | string | The resource group the deployment script was deployed into. | | `resourceId` | string | The resource ID of the deployment script. | diff --git a/arm/Microsoft.Resources/resourceGroups/deploy.bicep b/arm/Microsoft.Resources/resourceGroups/deploy.bicep index 536d41e7f7..81f31d26bc 100644 --- a/arm/Microsoft.Resources/resourceGroups/deploy.bicep +++ b/arm/Microsoft.Resources/resourceGroups/deploy.bicep @@ -69,3 +69,6 @@ output name string = resourceGroup.name @description('The resource ID of the resource group.') output resourceId string = resourceGroup.id + +@description('The location the resource was deployed into.') +output location string = resourceGroup.location diff --git a/arm/Microsoft.Resources/resourceGroups/readme.md b/arm/Microsoft.Resources/resourceGroups/readme.md index 5cb7135dd4..49f454a4d4 100644 --- a/arm/Microsoft.Resources/resourceGroups/readme.md +++ b/arm/Microsoft.Resources/resourceGroups/readme.md @@ -85,5 +85,6 @@ This module requires a User Assigned Identity (MSI, managed service identity) to | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the resource group. | | `resourceId` | string | The resource ID of the resource group. | diff --git a/arm/Microsoft.ServiceBus/namespaces/deploy.bicep b/arm/Microsoft.ServiceBus/namespaces/deploy.bicep index fbc5b3abeb..3a5627fbb7 100644 --- a/arm/Microsoft.ServiceBus/namespaces/deploy.bicep +++ b/arm/Microsoft.ServiceBus/namespaces/deploy.bicep @@ -339,3 +339,6 @@ output name string = serviceBusNamespace.name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(serviceBusNamespace.identity, 'principalId') ? serviceBusNamespace.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = serviceBusNamespace.location diff --git a/arm/Microsoft.ServiceBus/namespaces/readme.md b/arm/Microsoft.ServiceBus/namespaces/readme.md index 428e02ab95..289ddfa51e 100644 --- a/arm/Microsoft.ServiceBus/namespaces/readme.md +++ b/arm/Microsoft.ServiceBus/namespaces/readme.md @@ -166,6 +166,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed service bus namespace. | | `resourceGroupName` | string | The resource group of the deployed service bus namespace. | | `resourceId` | string | The resource ID of the deployed service bus namespace. | diff --git a/arm/Microsoft.ServiceFabric/clusters/deploy.bicep b/arm/Microsoft.ServiceFabric/clusters/deploy.bicep index 13fbeb0fbe..dc1a910eb1 100644 --- a/arm/Microsoft.ServiceFabric/clusters/deploy.bicep +++ b/arm/Microsoft.ServiceFabric/clusters/deploy.bicep @@ -321,3 +321,6 @@ output resourceId string = serviceFabricCluster.id @description('The Service Fabric Cluster endpoint.') output endpoint string = serviceFabricCluster.properties.clusterEndpoint + +@description('The location the resource was deployed into.') +output location string = serviceFabricCluster.location diff --git a/arm/Microsoft.ServiceFabric/clusters/readme.md b/arm/Microsoft.ServiceFabric/clusters/readme.md index 24b41f52bb..4d2621ac8d 100644 --- a/arm/Microsoft.ServiceFabric/clusters/readme.md +++ b/arm/Microsoft.ServiceFabric/clusters/readme.md @@ -132,6 +132,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | | `endpoint` | string | The Service Fabric Cluster endpoint. | +| `location` | string | The location the resource was deployed into. | | `name` | string | The Service Fabric Cluster name. | | `resourceGroupName` | string | The Service Fabric Cluster resource group. | | `resourceId` | string | The Service Fabric Cluster resource ID. | diff --git a/arm/Microsoft.Sql/managedInstances/databases/deploy.bicep b/arm/Microsoft.Sql/managedInstances/databases/deploy.bicep index 19ec8a9dfe..8eadd42cf2 100644 --- a/arm/Microsoft.Sql/managedInstances/databases/deploy.bicep +++ b/arm/Microsoft.Sql/managedInstances/databases/deploy.bicep @@ -196,3 +196,6 @@ output resourceId string = database.id @description('The resource group the database was deployed into.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = database.location diff --git a/arm/Microsoft.Sql/managedInstances/databases/readme.md b/arm/Microsoft.Sql/managedInstances/databases/readme.md index 6da4427ecb..03515381da 100644 --- a/arm/Microsoft.Sql/managedInstances/databases/readme.md +++ b/arm/Microsoft.Sql/managedInstances/databases/readme.md @@ -83,6 +83,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed database. | | `resourceGroupName` | string | The resource group the database was deployed into. | | `resourceId` | string | The resource ID of the deployed database. | diff --git a/arm/Microsoft.Sql/managedInstances/deploy.bicep b/arm/Microsoft.Sql/managedInstances/deploy.bicep index e13aa69e56..c172fd268c 100644 --- a/arm/Microsoft.Sql/managedInstances/deploy.bicep +++ b/arm/Microsoft.Sql/managedInstances/deploy.bicep @@ -380,3 +380,6 @@ output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(managedInstance.identity, 'principalId') ? managedInstance.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = managedInstance.location diff --git a/arm/Microsoft.Sql/managedInstances/readme.md b/arm/Microsoft.Sql/managedInstances/readme.md index 278819dce5..c56110479b 100644 --- a/arm/Microsoft.Sql/managedInstances/readme.md +++ b/arm/Microsoft.Sql/managedInstances/readme.md @@ -167,6 +167,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed managed instance. | | `resourceGroupName` | string | The resource group of the deployed managed instance. | | `resourceId` | string | The resource ID of the deployed managed instance. | diff --git a/arm/Microsoft.Sql/servers/databases/deploy.bicep b/arm/Microsoft.Sql/servers/databases/deploy.bicep index c9791da6ce..2c1dbf863e 100644 --- a/arm/Microsoft.Sql/servers/databases/deploy.bicep +++ b/arm/Microsoft.Sql/servers/databases/deploy.bicep @@ -225,3 +225,6 @@ output resourceId string = database.id @description('The resourceGroup of the deployed database.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = database.location diff --git a/arm/Microsoft.Sql/servers/databases/readme.md b/arm/Microsoft.Sql/servers/databases/readme.md index 9b09263672..b8dc1027b1 100644 --- a/arm/Microsoft.Sql/servers/databases/readme.md +++ b/arm/Microsoft.Sql/servers/databases/readme.md @@ -81,6 +81,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed database. | | `resourceGroupName` | string | The resourceGroup of the deployed database. | | `resourceId` | string | The resource ID of the deployed database. | diff --git a/arm/Microsoft.Sql/servers/deploy.bicep b/arm/Microsoft.Sql/servers/deploy.bicep index 825bd6a492..dbdb60b369 100644 --- a/arm/Microsoft.Sql/servers/deploy.bicep +++ b/arm/Microsoft.Sql/servers/deploy.bicep @@ -197,3 +197,6 @@ output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(server.identity, 'principalId') ? server.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = server.location diff --git a/arm/Microsoft.Sql/servers/readme.md b/arm/Microsoft.Sql/servers/readme.md index 8e8b45f566..17421071be 100644 --- a/arm/Microsoft.Sql/servers/readme.md +++ b/arm/Microsoft.Sql/servers/readme.md @@ -128,6 +128,7 @@ https://docs.microsoft.com/en-us/azure/templates/microsoft.sql/servers/administr | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed SQL server. | | `resourceGroupName` | string | The resourceGroup of the deployed SQL server. | | `resourceId` | string | The resource ID of the deployed SQL server. | diff --git a/arm/Microsoft.Storage/storageAccounts/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/deploy.bicep index afdd3da9f5..d05fc1915f 100644 --- a/arm/Microsoft.Storage/storageAccounts/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/deploy.bicep @@ -356,3 +356,6 @@ output primaryBlobEndpoint string = !empty(blobServices) && contains(blobService @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(storageAccount.identity, 'principalId') ? storageAccount.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = storageAccount.location diff --git a/arm/Microsoft.Storage/storageAccounts/readme.md b/arm/Microsoft.Storage/storageAccounts/readme.md index ec6146af84..1e9f52c8a0 100644 --- a/arm/Microsoft.Storage/storageAccounts/readme.md +++ b/arm/Microsoft.Storage/storageAccounts/readme.md @@ -192,6 +192,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed storage account. | | `primaryBlobEndpoint` | string | The primary blob endpoint reference if blob services are deployed. | | `resourceGroupName` | string | The resource group of the deployed storage account. | diff --git a/arm/Microsoft.Synapse/privateLinkHubs/deploy.bicep b/arm/Microsoft.Synapse/privateLinkHubs/deploy.bicep index 0fc250d813..b76c4b931b 100644 --- a/arm/Microsoft.Synapse/privateLinkHubs/deploy.bicep +++ b/arm/Microsoft.Synapse/privateLinkHubs/deploy.bicep @@ -83,3 +83,6 @@ output name string = privateLinkHub.name @description('The resource group of the deployed Synapse Private Link Hub.') output resourceGroupName string = resourceGroup().name + +@description('The location the resource was deployed into.') +output location string = privateLinkHub.location diff --git a/arm/Microsoft.Synapse/privateLinkHubs/readme.md b/arm/Microsoft.Synapse/privateLinkHubs/readme.md index bcab729a4e..602e223326 100644 --- a/arm/Microsoft.Synapse/privateLinkHubs/readme.md +++ b/arm/Microsoft.Synapse/privateLinkHubs/readme.md @@ -119,6 +119,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the deployed Synapse Private Link Hub. | | `resourceGroupName` | string | The resource group of the deployed Synapse Private Link Hub. | | `resourceId` | string | The resource ID of the deployed Synapse Private Link Hub. | diff --git a/arm/Microsoft.VirtualMachineImages/imageTemplates/deploy.bicep b/arm/Microsoft.VirtualMachineImages/imageTemplates/deploy.bicep index d47b12365a..a8cd986798 100644 --- a/arm/Microsoft.VirtualMachineImages/imageTemplates/deploy.bicep +++ b/arm/Microsoft.VirtualMachineImages/imageTemplates/deploy.bicep @@ -186,3 +186,6 @@ output name string = imageTemplate.name @description('The command to run in order to trigger the image build.') output runThisCommand string = 'Invoke-AzResourceAction -ResourceName ${imageTemplate.name} -ResourceGroupName ${resourceGroup().name} -ResourceType Microsoft.VirtualMachineImages/imageTemplates -Action Run -Force' + +@description('The location the resource was deployed into.') +output location string = imageTemplate.location diff --git a/arm/Microsoft.VirtualMachineImages/imageTemplates/readme.md b/arm/Microsoft.VirtualMachineImages/imageTemplates/readme.md index 876b230cdb..db014c980c 100644 --- a/arm/Microsoft.VirtualMachineImages/imageTemplates/readme.md +++ b/arm/Microsoft.VirtualMachineImages/imageTemplates/readme.md @@ -131,6 +131,7 @@ Create a role assignment for the given resource. If you want to assign a service | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the image template. | | `resourceGroupName` | string | The resource group the image template was deployed into. | | `resourceId` | string | The resource ID of the image template. | diff --git a/arm/Microsoft.Web/connections/deploy.bicep b/arm/Microsoft.Web/connections/deploy.bicep index 2e7a933f19..4ee18fbc33 100644 --- a/arm/Microsoft.Web/connections/deploy.bicep +++ b/arm/Microsoft.Web/connections/deploy.bicep @@ -110,3 +110,6 @@ output resourceGroupName string = resourceGroup().name @description('The name of the connection.') output name string = connection.name + +@description('The location the resource was deployed into.') +output location string = connection.location diff --git a/arm/Microsoft.Web/connections/readme.md b/arm/Microsoft.Web/connections/readme.md index 686bb2a38e..02e6f4a278 100644 --- a/arm/Microsoft.Web/connections/readme.md +++ b/arm/Microsoft.Web/connections/readme.md @@ -141,6 +141,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the connection. | | `resourceGroupName` | string | The resource group the connection was deployed into. | | `resourceId` | string | The resource ID of the connection. | diff --git a/arm/Microsoft.Web/hostingEnvironments/deploy.bicep b/arm/Microsoft.Web/hostingEnvironments/deploy.bicep index e0c57ad27d..e2384f59fe 100644 --- a/arm/Microsoft.Web/hostingEnvironments/deploy.bicep +++ b/arm/Microsoft.Web/hostingEnvironments/deploy.bicep @@ -207,3 +207,6 @@ output resourceGroupName string = resourceGroup().name @description('The name of the app service environment.') output name string = appServiceEnvironment.name + +@description('The location the resource was deployed into.') +output location string = appServiceEnvironment.location diff --git a/arm/Microsoft.Web/hostingEnvironments/readme.md b/arm/Microsoft.Web/hostingEnvironments/readme.md index a5aad4ccbc..a3e7355240 100644 --- a/arm/Microsoft.Web/hostingEnvironments/readme.md +++ b/arm/Microsoft.Web/hostingEnvironments/readme.md @@ -152,6 +152,7 @@ workerPools can have two properties workerSize and workerCount: | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the app service environment. | | `resourceGroupName` | string | The resource group the app service environment was deployed into. | | `resourceId` | string | The resource ID of the app service environment. | diff --git a/arm/Microsoft.Web/serverfarms/deploy.bicep b/arm/Microsoft.Web/serverfarms/deploy.bicep index 91aee2c5f0..7dff1b0ad0 100644 --- a/arm/Microsoft.Web/serverfarms/deploy.bicep +++ b/arm/Microsoft.Web/serverfarms/deploy.bicep @@ -180,3 +180,6 @@ output name string = appServicePlan.name @description('The resource ID of the app service plan.') output resourceId string = appServicePlan.id + +@description('The location the resource was deployed into.') +output location string = appServicePlan.location diff --git a/arm/Microsoft.Web/serverfarms/readme.md b/arm/Microsoft.Web/serverfarms/readme.md index dbe9c63eb4..226fdf2f51 100644 --- a/arm/Microsoft.Web/serverfarms/readme.md +++ b/arm/Microsoft.Web/serverfarms/readme.md @@ -110,6 +110,7 @@ Tag names and tag values can be provided as needed. A tag can be left without a | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the app service plan. | | `resourceGroupName` | string | The resource group the app service plan was deployed into. | | `resourceId` | string | The resource ID of the app service plan. | diff --git a/arm/Microsoft.Web/sites/deploy.bicep b/arm/Microsoft.Web/sites/deploy.bicep index 27480834f9..1242c98cdf 100644 --- a/arm/Microsoft.Web/sites/deploy.bicep +++ b/arm/Microsoft.Web/sites/deploy.bicep @@ -277,3 +277,6 @@ output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(app.identity, 'principalId') ? app.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = app.location diff --git a/arm/Microsoft.Web/sites/readme.md b/arm/Microsoft.Web/sites/readme.md index b0125b2ae1..172c623168 100644 --- a/arm/Microsoft.Web/sites/readme.md +++ b/arm/Microsoft.Web/sites/readme.md @@ -201,6 +201,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the site. | | `resourceGroupName` | string | The resource group the site was deployed into. | | `resourceId` | string | The resource ID of the site. | diff --git a/arm/Microsoft.Web/staticSites/deploy.bicep b/arm/Microsoft.Web/staticSites/deploy.bicep index 6f9a16794c..d88a15ca27 100644 --- a/arm/Microsoft.Web/staticSites/deploy.bicep +++ b/arm/Microsoft.Web/staticSites/deploy.bicep @@ -157,3 +157,6 @@ output resourceGroupName string = resourceGroup().name @description('The principal ID of the system assigned identity.') output systemAssignedPrincipalId string = systemAssignedIdentity && contains(staticSite.identity, 'principalId') ? staticSite.identity.principalId : '' + +@description('The location the resource was deployed into.') +output location string = staticSite.location diff --git a/arm/Microsoft.Web/staticSites/readme.md b/arm/Microsoft.Web/staticSites/readme.md index 94e5c28084..0e0d94f1a6 100644 --- a/arm/Microsoft.Web/staticSites/readme.md +++ b/arm/Microsoft.Web/staticSites/readme.md @@ -178,6 +178,7 @@ You can specify multiple user assigned identities to a resource by providing add | Output Name | Type | Description | | :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | | `name` | string | The name of the static site. | | `resourceGroupName` | string | The resource group the static site was deployed into. | | `resourceId` | string | The resource ID of the static site. | diff --git a/constructs/Microsoft.Authorization/roleAssignments-multiRolesMultiPrincipals/deploy.bicep b/constructs/Microsoft.Authorization/roleAssignments-multiRolesMultiPrincipals/deploy.bicep index caaee31e61..420aeee2f2 100644 --- a/constructs/Microsoft.Authorization/roleAssignments-multiRolesMultiPrincipals/deploy.bicep +++ b/constructs/Microsoft.Authorization/roleAssignments-multiRolesMultiPrincipals/deploy.bicep @@ -63,5 +63,6 @@ module nested_rbac_rg '.bicep/nested_rbac.bicep' = [for (roleAssignment, index) @description('The scope of the deployed role assignments.') output roleAssignmentScope string = !empty(managementGroupId) ? nested_rbac_mg[0].outputs.roleAssignmentScope : (!empty(resourceGroupName) ? nested_rbac_rg[0].outputs.roleAssignmentScope : nested_rbac_sub[0].outputs.roleAssignmentScope) + @description('The names of the deployed role assignments.') output roleAssignments array = roleAssignments diff --git a/docs/wiki/The CI environment - Static validation.md b/docs/wiki/The CI environment - Static validation.md index 3b0f2e8c48..f5890346ed 100644 --- a/docs/wiki/The CI environment - Static validation.md +++ b/docs/wiki/The CI environment - Static validation.md @@ -21,7 +21,7 @@ The following activities are run executing the `arm/.global/global.module.tests. - **Deployment template tests** check the template's structure and elements for errors as well as consistency matters. e.g. - template file (or the built bicep template) converts from JSON and has all expected properties - variable names are camelCase - - the minimum set of outputs is returned + - the minimum set of outputs is returned (see [module design](./The%20library%20-%20Module%20design#Outputs)) - **Module (readme.md) documentation** contains all required sections. e.g.: - is not empty - contains all the mandatory sections diff --git a/docs/wiki/The library - Module design.md b/docs/wiki/The library - Module design.md index 1892d8aba8..caf9b2a67a 100644 --- a/docs/wiki/The library - Module design.md +++ b/docs/wiki/The library - Module design.md @@ -505,8 +505,9 @@ While exceptions might be needed, the following guidance should be followed as m - At a minimum, reference the following: - `name` - `resourceId` - - `resourceGroupName` for resources deployed at resource group scope - - `systemAssignedPrincipalId` for all resources supporting a managed identity + - `resourceGroupName` for modules that are deployed at resource group scope + - `systemAssignedPrincipalId` for all modules that support a managed identities + - `location` for all modules where the primary resource has a location property - Add a `@description('...')` annotation with meaningful description to each output. --- diff --git a/utilities/pipelines/resourceDeployment/Test-TemplateDeployment.ps1 b/utilities/pipelines/resourceDeployment/Test-TemplateDeployment.ps1 index 2094654d06..7ac7afeb97 100644 --- a/utilities/pipelines/resourceDeployment/Test-TemplateDeployment.ps1 +++ b/utilities/pipelines/resourceDeployment/Test-TemplateDeployment.ps1 @@ -94,7 +94,7 @@ function Test-TemplateDeployment { $DeploymentInputs += $additionalParameters } - $deploymentScope = Get-ScopeOfTemplateFile -TemplateFilePath $templateFilePath + $deploymentScope = Get-ScopeOfTemplateFile -TemplateFilePath $templateFilePath -Verbose if ($deploymentScope -ne 'resourceGroup') { $deploymentNamePrefix = Split-Path -Path (Split-Path $templateFilePath -Parent) -LeafBase diff --git a/utilities/pipelines/sharedScripts/Get-NestedResourceList.ps1 b/utilities/pipelines/sharedScripts/Get-NestedResourceList.ps1 new file mode 100644 index 0000000000..e02ebc87bc --- /dev/null +++ b/utilities/pipelines/sharedScripts/Get-NestedResourceList.ps1 @@ -0,0 +1,41 @@ +#region Helper functions +<# +.SYNOPSIS +Get a list of all resources (provider + service) in the given template content + +.DESCRIPTION +Get a list of all resources (provider + service) in the given template content. Crawls through any children & nested deployment templates. + +.PARAMETER TemplateFileContent +Mandatory. The template file content object to crawl data from + +.EXAMPLE +Get-NestedResourceList -TemplateFileContent @{ resource = @{}; ... } + +Returns a list of all resources in the given template object +#> +function Get-NestedResourceList { + + [CmdletBinding()] + param( + [Parameter(Mandatory)] + [Alias('Path')] + [hashtable] $TemplateFileContent + ) + + $res = @() + $currLevelResources = @() + if ($TemplateFileContent.resources) { + $currLevelResources += $TemplateFileContent.resources + } + foreach ($resource in $currLevelResources) { + $res += $resource + + if ($resource.type -eq 'Microsoft.Resources/deployments') { + $res += Get-NestedResourceList -TemplateFileContent $resource.properties.template + } else { + $res += Get-NestedResourceList -TemplateFileContent $resource + } + } + return $res +} diff --git a/utilities/pipelines/sharedScripts/Get-ScopeOfTemplateFile.ps1 b/utilities/pipelines/sharedScripts/Get-ScopeOfTemplateFile.ps1 index 9c4abe57ce..f6417bbf29 100644 --- a/utilities/pipelines/sharedScripts/Get-ScopeOfTemplateFile.ps1 +++ b/utilities/pipelines/sharedScripts/Get-ScopeOfTemplateFile.ps1 @@ -47,7 +47,7 @@ function Get-ScopeOfTemplateFile { Default { throw "[$armSchema] is a non-supported ARM template schema" } } } - Write-Verbose "Determined deployment scope [$deploymentScope]" -Verbose + Write-Verbose "Determined deployment scope [$deploymentScope]" return $deploymentScope } diff --git a/utilities/tools/Set-ModuleReadMe.ps1 b/utilities/tools/Set-ModuleReadMe.ps1 index 0afd5f532a..ec38977e5a 100644 --- a/utilities/tools/Set-ModuleReadMe.ps1 +++ b/utilities/tools/Set-ModuleReadMe.ps1 @@ -1,47 +1,5 @@ #requires -version 6.0 -#region Helper functions -<# -.SYNOPSIS -Get a list of all resources (provider + service) in the given template content - -.DESCRIPTION -Get a list of all resources (provider + service) in the given template content. Crawls through any children & nested deployment templates. - -.PARAMETER TemplateFileContent -Mandatory. The template file content object to crawl data from - -.EXAMPLE -Get-NestedResourceList -TemplateFileContent @{ resource = @{}; ... } - -Returns a list of all resources in the given template object -#> -function Get-NestedResourceList { - - [CmdletBinding()] - param( - [Parameter(Mandatory)] - [Alias('Path')] - [hashtable] $TemplateFileContent - ) - - $res = @() - $currLevelResources = @() - if ($TemplateFileContent.resources) { - $currLevelResources += $TemplateFileContent.resources - } - foreach ($resource in $currLevelResources) { - $res += $resource - - if ($resource.type -eq 'Microsoft.Resources/deployments') { - $res += Get-NestedResourceList -TemplateFileContent $resource.properties.template - } else { - $res += Get-NestedResourceList -TemplateFileContent $resource - } - } - return $res -} - <# .SYNOPSIS Update the 'Resource Types' section of the given readme file @@ -485,6 +443,7 @@ function Set-ModuleReadMe { # Load external functions . (Join-Path $PSScriptRoot 'helper/Merge-FileWithNewContent.ps1') + . (Join-Path (Split-Path $PSScriptRoot -Parent) 'pipelines' 'sharedScripts' 'Get-NestedResourceList.ps1') # Check template & make full path $TemplateFilePath = Resolve-Path -Path $TemplateFilePath -ErrorAction Stop