diff --git a/ibm/service/globaltagging/resource_ibm_resource_tag.go b/ibm/service/globaltagging/resource_ibm_resource_tag.go index cbffa8ceb0..ec7281cc3b 100644 --- a/ibm/service/globaltagging/resource_ibm_resource_tag.go +++ b/ibm/service/globaltagging/resource_ibm_resource_tag.go @@ -13,7 +13,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/IBM-Cloud/bluemix-go/bmxerror" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/flex" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/validate" @@ -208,21 +207,10 @@ func resourceIBMResourceTagRead(d *schema.ResourceData, meta interface{}) error d.Set(acccountID, acctID) } } - tagList, err := flex.GetGlobalTagsUsingCRN(meta, rID, rType, tType) - if err != nil { - if apierr, ok := err.(bmxerror.RequestFailure); ok && apierr.StatusCode() == 404 { - d.SetId("") - return nil - } else if strings.Contains(err.Error(), "Too Many Requests") { - - tagList, err = flex.GetGlobalTagsUsingSearchAPI(meta, rID, rType, tType) - if err != nil { - return fmt.Errorf("[ERROR] Error getting resource tags for: %s with error : %s", rID, err) - } - } else { - return fmt.Errorf("[ERROR] Error getting resource tags for: %s with error : %s", rID, err) - } + tagList, err := flex.GetGlobalTagsUsingSearchAPI(meta, rID, rType, tType) + if err != nil { + return fmt.Errorf("[ERROR] Error getting resource tags for: %s with error : %s", rID, err) } d.Set(resourceID, rID)