Skip to content

[Modules] OPT1 - Update nested_roleAssignment to comply with prefer-unquoted-property-names linter rule#2187

Closed
eriqua wants to merge 10 commits intomainfrom
users/erikag/rbac-quotes
Closed

[Modules] OPT1 - Update nested_roleAssignment to comply with prefer-unquoted-property-names linter rule#2187
eriqua wants to merge 10 commits intomainfrom
users/erikag/rbac-quotes

Conversation

@eriqua
Copy link
Copy Markdown
Contributor

@eriqua eriqua commented Oct 10, 2022

Description

  • Update nested_roleAssignment to comply with prefer-unquoted-property-names linter rule (Remove quotes from role definition names not containing spaces)
  • Update nested_roleAssignment with role definition list fetched by the Get-RoleAssignmentsList.ps1 utility
  • Remove prefer-unquoted-property-names linter rule ignore from bicep.config
  • Update Get-RoleAssignmentsList.ps1 utility
  • Add Update-NestedRoleAssignment.ps1 utility
  • Wiki update

Note: unquoted role names are put on top for readability. Both categories (with and without quotes) are listed in alphabetical order

Pipeline references

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

Pipeline
AnalysisServices: Servers

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

@eriqua eriqua added enhancement New feature or request [cat] modules category: modules [cat] utilities category: utilities labels Oct 10, 2022
@eriqua eriqua requested a review from a team as a code owner October 10, 2022 12:42
}
$resArm += "`"{0}`": `"[subscriptionResourceId('Microsoft.Authorization/roleDefinitions','{1}')]`"," -f $role.Name, $role.Id
}
$resBicep = $resBicepTop + $resBicepQuote
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.

I'd almost prefer an alphabetical order to a 'visual' split. But I don't want to decide this :D

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.

Fair point. I've created PR #2200 with the alternative approach to be discussed

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.

I guess automation is king? :D

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.

Or queen 👑

eriqua and others added 4 commits October 11, 2022 10:00
Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
@eriqua eriqua changed the title [Modules] Update nested_roleAssignment to comply with prefer-unquoted-property-names linter rule [Modules] OPT1 - Update nested_roleAssignment to comply with prefer-unquoted-property-names linter rule Oct 11, 2022
@eriqua eriqua marked this pull request as draft October 11, 2022 15:59
@eriqua eriqua closed this Nov 3, 2022
@AlexanderSehr AlexanderSehr deleted the users/erikag/rbac-quotes branch November 5, 2022 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[cat] modules category: modules [cat] utilities category: utilities enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Handle new Bicep linter warning prefer-unquoted-property-names

2 participants