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

Update the roleAssignment.bicep module principalType property so that warnings do not occur #486

Closed
glennmusa opened this issue Oct 26, 2021 · 1 comment · Fixed by #534
Assignees
Labels
bug Something isn't working

Comments

@glennmusa
Copy link
Contributor

Benefit/Result/Outcome

So that deployments do not present warnings.

Description

Update the roleAssignment module's principalType to reflect the expected values:

Today's implementation:

@allowed([
'User'
'Group'
'ServicePrincipal'
'Unknown'
'DirectoryRoleTemplate'
'ForeignGroup'
'Application'
'MSI'
'DirectoryObjectOrGroup'
'Everyone'
])
param principalType string = 'ServicePrincipal'

The expected values are one of ForeignGroup, Group, ServicePrincipal, User, null as reported by the Bicep warning below:

workspaces/missionlz/src/bicep/modules/roleAssignment.bicep(23,20) : Warning BCP036: The property "principalType" expected a value of type "'ForeignGroup' | 'Group' | 'ServicePrincipal' | 'User' | null" but the provided value is of type "'Application' | 'DirectoryObjectOrGroup' | 'DirectoryRoleTemplate' | 'Everyone' | 'ForeignGroup' | 'Group' | 'MSI' | 'ServicePrincipal' | 'Unknown' | 'User'".

Acceptance Criteria

  • Role assignments still occur when necessary for policy, but without warnings at deployment time
@brooke-hamilton brooke-hamilton added bug Something isn't working and removed needs triage labels Nov 3, 2021
@lisamurphy-msft lisamurphy-msft self-assigned this Nov 12, 2021
@lisamurphy-msft
Copy link
Contributor

Instead of updating the list of allowed types, to include a null value - I think it might make more sense to remove the @Allowed stanza. Preliminary tests of this approach are returning successful - doing some additional testing and gathering peer feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants