From 111c00402c422af8f52e436f0936e74a2907bc78 Mon Sep 17 00:00:00 2001 From: IBM-diksha <112411162+IBM-diksha@users.noreply.github.com> Date: Tue, 30 Jan 2024 18:53:53 +0530 Subject: [PATCH] Adding changes in the fix for cos deletion access denied issue (#5085) * Adding the fix for cos deletion access denied issue * Addressing the review comments --- ibm/service/cos/resource_ibm_cos_bucket.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibm/service/cos/resource_ibm_cos_bucket.go b/ibm/service/cos/resource_ibm_cos_bucket.go index a7bfcace0b..fabf40bc9d 100644 --- a/ibm/service/cos/resource_ibm_cos_bucket.go +++ b/ibm/service/cos/resource_ibm_cos_bucket.go @@ -1565,7 +1565,7 @@ func resourceIBMCOSBucketExists(d *schema.ResourceData, meta interface{}) (bool, if resp != nil && resp.StatusCode == 404 { return false, nil } - fmt.Println(fmt.Errorf("[WARN] Error getting resource instance from cos bucket: %s with resp code: %s", err, resp)) + return false, fmt.Errorf("[WARN] Error getting resource instance from cos bucket: %s with resp code: %s", err, resp) } if instance != nil && (strings.Contains(*instance.State, "removed") || strings.Contains(*instance.State, "pending_reclamation")) { log.Printf("[WARN] Removing instance from state because it's in removed or pending_reclamation state from the cos bucket resource")