diff --git a/builtin/providers/azurerm/resource_arm_storage_account.go b/builtin/providers/azurerm/resource_arm_storage_account.go index 7e196980b..bba3e6b1c 100644 --- a/builtin/providers/azurerm/resource_arm_storage_account.go +++ b/builtin/providers/azurerm/resource_arm_storage_account.go @@ -193,9 +193,10 @@ func resourceArmStorageAccountCreate(d *schema.ResourceData, meta interface{}) e } // Create - cancelCtx, _ := context.WithTimeout(client.StopContext, 1*time.Hour) + cancelCtx, cancelFunc := context.WithTimeout(client.StopContext, 1*time.Hour) _, createErr := storageClient.Create( resourceGroupName, storageAccountName, opts, cancelCtx.Done()) + cancelFunc() // The only way to get the ID back apparently is to read the resource again read, err := storageClient.GetProperties(resourceGroupName, storageAccountName)