Skip to content

Commit

Permalink
Using resourceId() to define Cosmos DB SQL role definition ID
Browse files Browse the repository at this point in the history
  • Loading branch information
hatboyzero authored and jamesrcounts committed Mar 28, 2024
1 parent e8f1934 commit 9940230
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/starter/infra/shared/sqlRoleAssignments.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource roleAssignment 'Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignment
parent: cosmosDb
properties: {
principalId: principalId
roleDefinitionId: '/${subscription().id}/resourceGroups/${resourceGroup().name}/providers/Microsoft.DocumentDB/databaseAccounts/${cosmosDb.name}/sqlRoleDefinitions/${roleAssignmentToCreate.roleDefinitionId}'
roleDefinitionId: resourceId('Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions', cosmosDb.name, roleAssignmentToCreate.roleDefinitionId)
scope: cosmosDb.id
}
}
Expand Down

0 comments on commit 9940230

Please sign in to comment.