[Fixes] Update rg roleAssignments name (guid) to use rg resourceID instead of rg name #2642
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
From: Create Azure RBAC resources by using Bicep
A role assignment's resource name must be a globally unique identifier (GUID).
It's a good practice to create a GUID that uses the scope, principal ID, and role ID together
This PR is about using the resource ID instead of the resource name as the scope when calculating the RG role assignment name (GUID). This is also consistent with what done by nested_roleAssignment templates at resource scope for other modules.
This also fixes an error thrown by the Bicep compiler once upgrading Bicep to release 0.14.6
Argument of type "null | string" is not assignable to parameter of type "string".bicep(BCP070)
Pipeline references
Type of Change
Please delete options that are not relevant.
Checklist