From 293f7da9aa822012fef6a71064b084d83a7199fa Mon Sep 17 00:00:00 2001 From: Tom Harvey Date: Thu, 11 Feb 2021 04:24:32 +0100 Subject: [PATCH] r/cosmosdb_account: removing a panic when the response is nil (#10525) Fixes #10522 --- .../internal/services/cosmos/cosmosdb_account_resource.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/azurerm/internal/services/cosmos/cosmosdb_account_resource.go b/azurerm/internal/services/cosmos/cosmosdb_account_resource.go index 2f1a51c8533e..a8e32f210351 100644 --- a/azurerm/internal/services/cosmos/cosmosdb_account_resource.go +++ b/azurerm/internal/services/cosmos/cosmosdb_account_resource.go @@ -768,11 +768,7 @@ func resourceCosmosDbAccountDelete(d *schema.ResourceData, meta interface{}) err return err } - future, err := client.Delete(ctx, id.ResourceGroup, id.Name) - if err != nil { - if future.Response().StatusCode == http.StatusNoContent { - return nil - } + if _, err := client.Delete(ctx, id.ResourceGroup, id.Name); err != nil { return fmt.Errorf("deleting CosmosDB Account %q (Resource Group %q): %+v", id.Name, id.ResourceGroup, err) }