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 @@ -357,7 +357,7 @@ resource roleAssignment 'Microsoft.Authorization/roleAssignments@2020-10-01-prev
output name string = roleAssignment.name

@sys.description('The resource ID of the Role Assignment.')
output scope string = tenantResourceId('Microsoft.Management/managementGroups', managementGroupId)
output resourceId string = extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', managementGroupId), 'Microsoft.Authorization/roleAssignments', roleAssignment.name)

@sys.description('The scope this Role Assignment applies to.')
output resourceId string = extensionResourceId(tenantResourceId('Microsoft.Management/managementGroups', managementGroupId), 'Microsoft.Authorization/roleAssignments', roleAssignment.name)
output scope string = tenantResourceId('Microsoft.Management/managementGroups', managementGroupId)
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ With this module you can perform role assignments on a management group level
| Output Name | Type | Description |
| :-- | :-- | :-- |
| `name` | string | The GUID of the Role Assignment. |
| `resourceId` | string | The scope this Role Assignment applies to. |
| `scope` | string | The resource ID of the Role Assignment. |
| `resourceId` | string | The resource ID of the Role Assignment. |
| `scope` | string | The scope this Role Assignment applies to. |
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ resource roleAssignment 'Microsoft.Authorization/roleAssignments@2020-10-01-prev
output name string = roleAssignment.name

@sys.description('The resource ID of the Role Assignment.')
output scope string = resourceGroup().id

@sys.description('The scope this Role Assignment applies to.')
output resourceId string = az.resourceId(resourceGroupName, 'Microsoft.Authorization/roleAssignments', roleAssignment.name)

@sys.description('The name of the resource group the role assignment was applied at.')
output resourceGroupName string = resourceGroup().name

@sys.description('The scope this Role Assignment applies to.')
output scope string = resourceGroup().id
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ With this module you can perform role assignments on a resource group level
| :-- | :-- | :-- |
| `name` | string | The GUID of the Role Assignment. |
| `resourceGroupName` | string | The name of the resource group the role assignment was applied at. |
| `resourceId` | string | The scope this Role Assignment applies to. |
| `scope` | string | The resource ID of the Role Assignment. |
| `resourceId` | string | The resource ID of the Role Assignment. |
| `scope` | string | The scope this Role Assignment applies to. |
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ resource roleAssignment 'Microsoft.Authorization/roleAssignments@2020-10-01-prev
output name string = roleAssignment.name

@sys.description('The resource ID of the Role Assignment.')
output scope string = subscription().id
output resourceId string = subscriptionResourceId(subscriptionId, 'Microsoft.Authorization/roleAssignments', roleAssignment.name)

@sys.description('The scope this Role Assignment applies to.')
output resourceId string = subscriptionResourceId(subscriptionId, 'Microsoft.Authorization/roleAssignments', roleAssignment.name)
output scope string = subscription().id
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ With this module you can perform role assignments on a subscription level
| Output Name | Type | Description |
| :-- | :-- | :-- |
| `name` | string | The GUID of the Role Assignment. |
| `resourceId` | string | The scope this Role Assignment applies to. |
| `scope` | string | The resource ID of the Role Assignment. |
| `resourceId` | string | The resource ID of the Role Assignment. |
| `scope` | string | The scope this Role Assignment applies to. |
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ output name string = empty(subscriptionId) && empty(resourceGroupName) ? roleDef
output resourceId string = empty(subscriptionId) && empty(resourceGroupName) ? roleDefinition_mg.outputs.resourceId : (!empty(subscriptionId) && empty(resourceGroupName) ? roleDefinition_sub.outputs.resourceId : roleDefinition_rg.outputs.resourceId)

@sys.description('The scope this Role Definition applies to.')
output roleDefinitionScope string = empty(subscriptionId) && empty(resourceGroupName) ? roleDefinition_mg.outputs.scope : (!empty(subscriptionId) && empty(resourceGroupName) ? roleDefinition_sub.outputs.scope : roleDefinition_rg.outputs.scope)
output scope string = empty(subscriptionId) && empty(resourceGroupName) ? roleDefinition_mg.outputs.scope : (!empty(subscriptionId) && empty(resourceGroupName) ? roleDefinition_sub.outputs.scope : roleDefinition_rg.outputs.scope)
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ module roledefinition 'yourpath/modules/Microsoft.Authorization.roleDefinitions/
| :-- | :-- | :-- |
| `name` | string | The GUID of the Role Definition. |
| `resourceId` | string | The resource ID of the Role Definition. |
| `roleDefinitionScope` | string | The scope this Role Definition applies to. |
| `scope` | string | The scope this Role Definition applies to. |

## Considerations

Expand Down