Skip to content

Commit

Permalink
Update azure/services/vnetpeerings/vnetpeerings.go
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Tong <jt572@cornell.edu>
  • Loading branch information
Cecile Robert-Michon and Jont828 authored Jan 10, 2022
1 parent bc4f9e7 commit 9e6748c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion azure/services/vnetpeerings/vnetpeerings.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (s *Service) Delete(ctx context.Context) error {

// We go through the list of VnetPeeringSpecs to delete each one, independently of the result of the previous one.
// If multiple errors occur, we return the most pressing one.
// Order of precedence (highest -> lowest) is: error that is not an operationNotDoneError (ie. error creating) -> operationNotDoneError (ie. creating in progress) -> no error (ie. created)
// Order of precedence (highest -> lowest) is: error that is not an operationNotDoneError (i.e. error deleting) -> operationNotDoneError (i.e. deleting in progress) -> no error (i.e. deleted)
for _, peeringSpec := range s.Scope.VnetPeeringSpecs() {
if err := s.DeleteResource(ctx, peeringSpec, serviceName); err != nil {
if !azure.IsOperationNotDoneError(err) || result == nil {
Expand Down

0 comments on commit 9e6748c

Please # to comment.