Skip to content

Commit

Permalink
r/api_management: fixing a bug where a NotFound from the LRO (a bug) …
Browse files Browse the repository at this point in the history
…wouldn't be surfaced
  • Loading branch information
tombuildsstuff committed Jul 31, 2023
1 parent 81d77cc commit 25645a1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions internal/services/apimanagement/api_management_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (

"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/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/identity"
Expand Down Expand Up @@ -1183,9 +1182,7 @@ func resourceApiManagementServiceDelete(d *pluginsdk.ResourceData, meta interfac
}

if err = future.WaitForCompletionRef(ctx, client.Client); err != nil {
if !response.WasNotFound(future.Response()) {
return fmt.Errorf("waiting for deletion of %s: %+v", *id, err)
}
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 25645a1

Please sign in to comment.