Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fixes] Update rg roleAssignments name (guid) to use rg resourceID instead of rg name #2642

Merged
merged 5 commits into from
Feb 2, 2023

Conversation

eriqua
Copy link
Contributor

@eriqua eriqua commented Feb 1, 2023

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)

image

Pipeline references

For module/pipeline changes, please create and attach the status badge of your successful run.

Pipeline
Resources: ResourceGroups

Type of Change

Please delete options that are not relevant.

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Update to documentation

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (readme)
  • I did format my code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[cat] modules category: modules enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants