Skip to content

Commit

Permalink
azurerm_role_assignment fix crash in retry logic (#10051)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackofallops authored Jan 5, 2021
1 parent bb7c6b9 commit 908b3d4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func retryRoleAssignmentsClient(d *schema.ResourceData, scope string, name strin
if err != nil {
if utils.ResponseErrorIsRetryable(err) {
return resource.RetryableError(err)
} else if resp.Response.StatusCode == 400 && strings.Contains(err.Error(), "PrincipalNotFound") {
} else if utils.ResponseWasStatusCode(resp.Response, 400) && strings.Contains(err.Error(), "PrincipalNotFound") {
// When waiting for service principal to become available
return resource.RetryableError(err)
}
Expand Down

0 comments on commit 908b3d4

Please sign in to comment.