Skip to content

Commit 9199c15

Browse files
authored
azurerm_pim_eligible_role_assignment - user atScope() as filter (#29781)
* [ENHANCEMENT] * `azurerm_pim_eligible_role_assignment` - improve filter used during List request to prevent internal server errors
1 parent 35560df commit 9199c15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/services/authorization/pim_eligible_role_assignment_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ func findRoleEligibilitySchedule(ctx context.Context, client *roleeligibilitysch
685685
}
686686

687687
schedulesResult, err := client.ListForScopeComplete(ctx, *scopeId, roleeligibilityschedules.ListForScopeOperationOptions{
688-
Filter: pointer.To(fmt.Sprintf("(principalId eq '%s')", id.PrincipalId)),
688+
Filter: pointer.To(fmt.Sprintf("(principalId eq '%s') and atScope()", id.PrincipalId)),
689689
})
690690
if err != nil {
691691
return nil, fmt.Errorf("listing Role Eligiblity Schedules for %s: %+v", scopeId, err)

0 commit comments

Comments
 (0)