Skip to content
Closed
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, '/'))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @paggarwalmsft, could you kindly provide more info on the error you are experiencing? E.g., is it when deploying locally or through pipelines? Which bicep version are you using to deploy?

Copy link
Copy Markdown
Contributor

@AlexanderSehr AlexanderSehr Jun 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Echoing @eriquas comment, this character was added to align with a specific null-checker linter rule (see this PR). That being said, maybe they changed their rules yet again. At least I cannot reproduce the linter warning when removing the ! locally either. I'll try to find out if there is some documented update of the rule set.

Like Erika said, please let us know which Bicep CLI version you're using (bicep -version).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bicep CLI version 0.18.4 (1620479ac6)

}

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 @@ -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 @@ -51,7 +51,7 @@ var builtInRoleNames = {
}

resource containerApp 'Microsoft.App/containerApps@2022-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 @@ -51,7 +51,7 @@ var builtInRoleNames = {
}

resource managedEnvironment 'Microsoft.App/managedEnvironments@2022-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 @@ -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
2 changes: 1 addition & 1 deletion modules/cache/redis/.bicep/nested_roleAssignments.bicep
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
2 changes: 1 addition & 1 deletion modules/cdn/profiles/.bicep/nested_roleAssignments.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,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 @@ -74,7 +74,7 @@ var builtInRoleNames = {
}

resource account 'Microsoft.CognitiveServices/accounts@2022-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 @@ -72,7 +72,7 @@ var builtInRoleNames = {
}

resource availabilitySet 'Microsoft.Compute/availabilitySets@2022-11-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 @@ -72,7 +72,7 @@ var builtInRoleNames = {
}

resource diskEncryptionSet 'Microsoft.Compute/diskEncryptionSets@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 @@ -72,7 +72,7 @@ var builtInRoleNames = {
}

resource disk 'Microsoft.Compute/disks@2022-07-02' 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 @@ -72,7 +72,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 @@ -72,7 +72,7 @@ var builtInRoleNames = {
}

resource image 'Microsoft.Compute/images@2022-11-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 @@ -72,7 +72,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 @@ -72,7 +72,7 @@ var builtInRoleNames = {
}

resource sshKey 'Microsoft.Compute/sshPublicKeys@2022-11-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 @@ -72,7 +72,7 @@ var builtInRoleNames = {
}

resource vmss 'Microsoft.Compute/virtualMachineScaleSets@2022-11-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 @@ -72,7 +72,7 @@ var builtInRoleNames = {
}

resource virtualMachine 'Microsoft.Compute/virtualMachines@2022-11-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 @@ -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 @@ -64,7 +64,7 @@ var builtInRoleNames = {
}

resource managedCluster 'Microsoft.ContainerService/managedClusters@2022-11-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 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
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ var builtInRoleNames = {
}

resource backupVault 'Microsoft.DataProtection/backupVaults@2022-11-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 @@ -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 @@ -51,7 +51,7 @@ var builtInRoleNames = {
}

resource flexibleServer 'Microsoft.DBforMySQL/flexibleServers@2022-09-30-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 @@ -64,7 +64,7 @@ var builtInRoleNames = {
}

resource appGroup 'Microsoft.DesktopVirtualization/applicationGroups@2022-09-09' 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 hostPool 'Microsoft.DesktopVirtualization/hostPools@2022-09-09' 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-09-09' 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 workspace 'Microsoft.DesktopVirtualization/workspaces@2022-09-09' 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 @@ -53,7 +53,7 @@ var builtInRoleNames = {
}

resource digitalTwinsInstance 'Microsoft.DigitalTwins/digitalTwinsInstances@2022-05-31' 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@2023-04-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 @@ -56,7 +56,7 @@ var builtInRoleNames = {
}

resource domain 'Microsoft.EventGrid/domains@2022-06-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 @@ -56,7 +56,7 @@ var builtInRoleNames = {
}

resource systemTopic 'Microsoft.EventGrid/systemTopics@2021-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 @@ -56,7 +56,7 @@ var builtInRoleNames = {
}

resource eventGrid 'Microsoft.EventGrid/topics@2020-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 @@ -55,7 +55,7 @@ var builtInRoleNames = {
}

resource eventHubNamespace 'Microsoft.EventHub/namespaces@2021-11-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 healthBot 'Microsoft.HealthBot/healthBots@2022-08-08' 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 @@ -59,7 +59,7 @@ var builtInRoleNames = {
}

resource workspace 'Microsoft.HealthcareApis/workspaces@2022-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 @@ -180,7 +180,7 @@ var builtInRoleNames = {
}

resource actionGroup 'Microsoft.Insights/actionGroups@2023-01-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 @@ -180,7 +180,7 @@ var builtInRoleNames = {
}

resource activityLogAlert 'Microsoft.Insights/activityLogAlerts@2020-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 @@ -180,7 +180,7 @@ var builtInRoleNames = {
}

resource appInsights 'Microsoft.Insights/components@2020-02-02' 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 @@ -180,7 +180,7 @@ var builtInRoleNames = {
}

resource dataCollectionEndpoint 'Microsoft.Insights/dataCollectionEndpoints@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
Loading