Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ var builtInRoleNames = {
}

resource AzureADDS 'Microsoft.AAD/DomainServices@2021-05-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var builtInRoleNames = {
}

resource server 'Microsoft.AnalysisServices/servers@2017-08-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}

resource keyVault 'Microsoft.KeyVault/vaults@2019-09-01' existing = {
name: last(split(clientCredentialsKeyVaultId, '/'))
name: last(split(clientCredentialsKeyVaultId, '/'))!
scope: resourceGroup(split(clientCredentialsKeyVaultId, '/')[2], split(clientCredentialsKeyVaultId, '/')[4])
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var builtInRoleNames = {
}

resource service 'Microsoft.ApiManagement/service@2020-12-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var builtInRoleNames = {
}

resource appConfiguration 'Microsoft.AppConfiguration/configurationStores@2021-10-01-preview' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var builtInRoleNames = {
}

resource appConfiguration 'Microsoft.AppConfiguration/configurationStores@2021-10-01-preview' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ This module deploys an App Configuration Store.
| `Microsoft.Authorization/locks` | [2020-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-05-01/locks) |
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |
| `Microsoft.Network/privateEndpoints` | [2022-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-05-01/privateEndpoints) |
| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2022-05-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-05-01/privateEndpoints/privateDnsZoneGroups) |
| `Microsoft.Network/privateEndpoints` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/privateEndpoints) |
| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2022-07-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2022-07-01/privateEndpoints/privateDnsZoneGroups) |

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var builtInRoleNames = {
}

resource automationAccount 'Microsoft.Automation/automationAccounts@2020-01-13-preview' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,12 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}

resource cMKKeyVault 'Microsoft.KeyVault/vaults@2021-10-01' existing = if (!empty(cMKKeyVaultResourceId)) {
name: last(split(cMKKeyVaultResourceId, '/'))
name: last(split(cMKKeyVaultResourceId, '/'))!
scope: resourceGroup(split(cMKKeyVaultResourceId, '/')[2], split(cMKKeyVaultResourceId, '/')[4])
}

resource cMKKeyVaultKey 'Microsoft.KeyVault/vaults/keys@2021-10-01' existing = if (!empty(cMKKeyVaultResourceId) && !empty(cMKKeyName)) {
name: '${last(split(cMKKeyVaultResourceId, '/'))}/${cMKKeyName}'
name: '${last(split(cMKKeyVaultResourceId, '/'))}/${cMKKeyName}'!
scope: resourceGroup(split(cMKKeyVaultResourceId, '/')[2], split(cMKKeyVaultResourceId, '/')[4])
}

Expand Down Expand Up @@ -285,7 +285,7 @@ module automationAccount_linkedService '../../Microsoft.OperationalInsights/work
name: '${uniqueString(deployment().name, location)}-AutoAccount-LinkedService'
params: {
name: 'automation'
logAnalyticsWorkspaceName: last(split(linkedWorkspaceResourceId, '/'))
logAnalyticsWorkspaceName: last(split(linkedWorkspaceResourceId, '/'))!
enableDefaultTelemetry: enableReferencedModulesTelemetry
resourceId: automationAccount.id
tags: tags
Expand All @@ -300,7 +300,7 @@ module automationAccount_solutions '../../Microsoft.OperationsManagement/solutio
params: {
name: gallerySolution.name
location: location
logAnalyticsWorkspaceName: last(split(linkedWorkspaceResourceId, '/'))
logAnalyticsWorkspaceName: last(split(linkedWorkspaceResourceId, '/'))!
product: contains(gallerySolution, 'product') ? gallerySolution.product : 'OMSGallery'
publisher: contains(gallerySolution, 'publisher') ? gallerySolution.publisher : 'Microsoft'
enableDefaultTelemetry: enableReferencedModulesTelemetry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ resource automationAccount 'Microsoft.Automation/automationAccounts@2020-01-13-p
}

resource storageAccount 'Microsoft.Storage/storageAccounts@2021-06-01' existing = if (!empty(scriptStorageAccountId)) {
name: last(split(scriptStorageAccountId, '/'))
name: last(split(scriptStorageAccountId, '/'))!
scope: resourceGroup(split(scriptStorageAccountId, '/')[2], split(scriptStorageAccountId, '/')[4])
}

Expand Down
2 changes: 1 addition & 1 deletion modules/Microsoft.Batch/batchAccounts/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}

resource keyVaultReferenceKeyVault 'Microsoft.KeyVault/vaults@2021-10-01' existing = if (!empty(keyVaultReferenceResourceId)) {
name: last(split(keyVaultReferenceResourceId, '/'))
name: last(split(keyVaultReferenceResourceId, '/'))!
scope: resourceGroup(split(keyVaultReferenceResourceId, '/')[2], split(keyVaultReferenceResourceId, '/')[4])
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var builtInRoleNames = {
}

resource cdnProfile 'Microsoft.Cdn/profiles@2021-06-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var builtInRoleNames = {
}

resource redisCache 'Microsoft.Cache/redis@2021-06-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var builtInRoleNames = {
}

resource account 'Microsoft.CognitiveServices/accounts@2017-04-18' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
6 changes: 3 additions & 3 deletions modules/Microsoft.CognitiveServices/accounts/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,17 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}

resource cMKKeyVault 'Microsoft.KeyVault/vaults@2021-06-01-preview' existing = if (!empty(cMKKeyVaultResourceId)) {
name: last(split(cMKKeyVaultResourceId, '/'))
name: last(split(cMKKeyVaultResourceId, '/'))!
scope: resourceGroup(split(cMKKeyVaultResourceId, '/')[2], split(cMKKeyVaultResourceId, '/')[4])
}

resource cMKKeyVaultKey 'Microsoft.KeyVault/vaults/keys@2021-10-01' existing = if (!empty(cMKKeyVaultResourceId) && !empty(cMKKeyName)) {
name: '${last(split(cMKKeyVaultResourceId, '/'))}/${cMKKeyName}'
name: '${last(split(cMKKeyVaultResourceId, '/'))}/${cMKKeyName}'!
scope: resourceGroup(split(cMKKeyVaultResourceId, '/')[2], split(cMKKeyVaultResourceId, '/')[4])
}

resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' existing = if (!empty(cMKUserAssignedIdentityResourceId)) {
name: last(split(cMKUserAssignedIdentityResourceId, '/'))
name: last(split(cMKUserAssignedIdentityResourceId, '/'))!
scope: resourceGroup(split(cMKUserAssignedIdentityResourceId, '/')[2], split(cMKUserAssignedIdentityResourceId, '/')[4])
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var builtInRoleNames = {
}

resource availabilitySet 'Microsoft.Compute/availabilitySets@2021-04-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var builtInRoleNames = {
}

resource disk 'Microsoft.Compute/disks@2021-08-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var builtInRoleNames = {
}

resource gallery 'Microsoft.Compute/galleries@2021-10-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var builtInRoleNames = {
}

resource image 'Microsoft.Compute/images@2021-04-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var builtInRoleNames = {
}

resource proximityPlacementGroup 'Microsoft.Compute/proximityPlacementGroups@2021-04-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var builtInRoleNames = {
}

resource vmss 'Microsoft.Compute/virtualMachineScaleSets@2021-04-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ module vmss_microsoftAntiMalwareExtension 'extensions/deploy.bicep' = if (extens
}

resource vmss_logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' existing = if (!empty(monitoringWorkspaceId)) {
name: last(split(monitoringWorkspaceId, '/'))
name: last(split(monitoringWorkspaceId, '/'))!
scope: resourceGroup(split(monitoringWorkspaceId, '/')[2], split(monitoringWorkspaceId, '/')[4])
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var builtInRoleNames = {
}

resource virtualMachine 'Microsoft.Compute/virtualMachines@2021-07-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
2 changes: 1 addition & 1 deletion modules/Microsoft.Compute/virtualMachines/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ module vm_microsoftAntiMalwareExtension 'extensions/deploy.bicep' = if (extensio
}

resource vm_logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' existing = if (!empty(monitoringWorkspaceId)) {
name: last(split(monitoringWorkspaceId, '/'))
name: last(split(monitoringWorkspaceId, '/'))!
scope: az.resourceGroup(split(monitoringWorkspaceId, '/')[2], split(monitoringWorkspaceId, '/')[4])
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}

resource cmkKeyVault 'Microsoft.KeyVault/vaults@2021-06-01-preview' existing = if (!empty(cMKKeyVaultResourceId)) {
name: last(split(cMKKeyVaultResourceId, '/'))
name: last(split(cMKKeyVaultResourceId, '/'))!
scope: resourceGroup(split(cMKKeyVaultResourceId, '/')[2], split(cMKKeyVaultResourceId, '/')[4])
}

resource cMKKeyVaultKey 'Microsoft.KeyVault/vaults/keys@2021-10-01' existing = if (!empty(cMKKeyVaultResourceId) && !empty(cMKKeyName)) {
name: '${last(split(cMKKeyVaultResourceId, '/'))}/${cMKKeyName}'
name: '${last(split(cMKKeyVaultResourceId, '/'))}/${cMKKeyName}'!
scope: resourceGroup(split(cMKKeyVaultResourceId, '/')[2], split(cMKKeyVaultResourceId, '/')[4])
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var builtInRoleNames = {
}

resource registry 'Microsoft.ContainerRegistry/registries@2021-09-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}

resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' existing = if (!empty(cMKUserAssignedIdentityResourceId)) {
name: last(split(cMKUserAssignedIdentityResourceId, '/'))
name: last(split(cMKUserAssignedIdentityResourceId, '/'))!
scope: resourceGroup(split(cMKUserAssignedIdentityResourceId, '/')[2], split(cMKUserAssignedIdentityResourceId, '/')[4])
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var builtInRoleNames = {
}

resource managedCluster 'Microsoft.ContainerService/managedClusters@2022-04-02-preview' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var builtInRoleNames = {
}

resource flexibleServer 'Microsoft.DBforPostgreSQL/flexibleServers@2022-01-20-preview' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var builtInRoleNames = {
}

resource dataFactory 'Microsoft.DataFactory/factories@2018-06-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
2 changes: 1 addition & 1 deletion modules/Microsoft.DataFactory/factories/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ var identity = identityType != 'None' ? {
var enableReferencedModulesTelemetry = false

resource cMKKeyVault 'Microsoft.KeyVault/vaults@2021-10-01' existing = if (!empty(cMKKeyVaultResourceId)) {
name: last(split(cMKKeyVaultResourceId, '/'))
name: last(split(cMKKeyVaultResourceId, '/'))!
scope: resourceGroup(split(cMKKeyVaultResourceId, '/')[2], split(cMKKeyVaultResourceId, '/')[4])
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ var builtInRoleNames = {
}

resource backupVault 'Microsoft.DataProtection/backupVaults@2022-03-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var builtInRoleNames = {
}

resource workspace 'Microsoft.Databricks/workspaces@2018-04-01' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ var builtInRoleNames = {
}

resource appGroup 'Microsoft.DesktopVirtualization/applicationgroups@2021-07-12' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ var builtInRoleNames = {
}

resource scalingPlan 'Microsoft.DesktopVirtualization/scalingPlans@2022-04-01-preview' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var builtInRoleNames = {
}

resource lab 'Microsoft.DevTestLab/labs@2018-09-15' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var builtInRoleNames = {
}

resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' existing = {
name: last(split(resourceId, '/'))
name: last(split(resourceId, '/'))!
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for principalId in principalIds: {
Expand Down
Loading