ALZ-Bicep icon indicating copy to clipboard operation
ALZ-Bicep copied to clipboard

Custom role definition as user-defined type

Open picccard opened this issue 1 year ago • 0 comments

Overview/Summary

The module for customRoleDefinitions currently includes the CAF recommended custom roles, with no way to add additional roles. Customers who would like more custom roles have these options:

  1. Modify the module directly (not recommended and would brake on newer releases)
  2. Copy the module to config/custom-modules and maintain it themselves
  3. Other (such as bash/powershell-script, etc.)

This issue of no clear way to extend the usage of the module is also found in #646

This PR aims to allow extention of the module, with more custom roles through the parameter file. This together with a user-defined type for customRoles adds IntelliSense when using bicepparam instead of json for the parameterfile. The parameter parAdditionalRoles is added and prefilled with example roles as of now.

Now the drawback of this approach is that roleDefinitions isn't seperated into their own file, everything is just mashed together into one big parameterfile.

I'm looking for feedback on this approach. Would it be bad design to not keep roleDefs in their own file? Should the CAF recommended custom roles be included in the parameter aswell or should they be held separately?

Please mark the PR don't merge.

This PR fixes/adds/changes/removes

Instead of customers changing the released module this PR opens the possibility to add more custom roles through the parameter file.

Breaking Changes

  1. None yet.

picccard avatar Nov 05 '23 22:11 picccard