Azure / ResourceModules

This repository includes a CI platform for and collection of mature and curated Bicep modules. The platform supports both ARM and Bicep and can be leveraged using GitHub actions as well as Azure DevOps pipelines.
https://aka.ms/carml
MIT License
725 stars 459 forks source link

[PSRule] Fix Rule Azure.Policy.AssignmentDescriptors #2668

Closed fabmas closed 1 year ago

fabmas commented 1 year ago

Rule Azure.Policy.AssignmentDescriptors

Error: AZR-000143: ***apasubmin001 failed Azure.Policy.AssignmentDescriptors. Policy assignments should use a display name and description.

:question: Validate with the team if the following actions are good:

  1. Set "description" and "displayName" as mandatory parameters in the deploy.bicep file.
  2. Add the following parameters on the deploy.test.bicep:
    description: '[Description] Policy Assignment at the management group scope'   
    displayName: '[Display Name] Policy Assignment at the management group scope'

    Above actions should be applied to the following files:

eriqua commented 1 year ago

OPT 1: Configure the Rule to be ignored for files (i.e., exclusion) OPT 2: Make the property mandatory and update the test cases to comply

Team decides for OPT1