Skip to content

Commit

Permalink
r/api_management: reverting #22752 temporarily until we're on `hashic…
Browse files Browse the repository at this point in the history
…orp/go-azure-sdk`
  • Loading branch information
tombuildsstuff committed Aug 1, 2023
1 parent 8b70c3b commit 8c4188b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/services/apimanagement/api_management_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
"strings"
"time"

"github.com/hashicorp/go-azure-helpers/lang/response"

"github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2021-08-01/apimanagement" // nolint: staticcheck
"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
Expand Down Expand Up @@ -1182,7 +1184,10 @@ func resourceApiManagementServiceDelete(d *pluginsdk.ResourceData, meta interfac
}

if err = future.WaitForCompletionRef(ctx, client.Client); err != nil {
return fmt.Errorf("waiting for deletion of %s: %+v", *id, err)
// TODO: @tombuildsstuff: this NotFound can be removed once this is switched to `go-azure-sdk`
if !response.WasNotFound(future.Response()) {
return fmt.Errorf("waiting for deletion of %s: %+v", *id, err)
}
}

// Purge the soft deleted Api Management permanently if the feature flag is enabled
Expand Down

0 comments on commit 8c4188b

Please sign in to comment.