From a4ffa4b059803e795bd8c1ec8b4221b866ae39ec Mon Sep 17 00:00:00 2001 From: Rohit Myali Date: Mon, 14 Oct 2024 11:48:38 +0000 Subject: [PATCH] Updated the read func to handle if the resource is not present on NetScaler Signed-off-by: Rohit Myali --- citrixadc/resource_citrixadc_dnsnsrec.go | 1 + 1 file changed, 1 insertion(+) diff --git a/citrixadc/resource_citrixadc_dnsnsrec.go b/citrixadc/resource_citrixadc_dnsnsrec.go index 6e5b87ebc..091132334 100644 --- a/citrixadc/resource_citrixadc_dnsnsrec.go +++ b/citrixadc/resource_citrixadc_dnsnsrec.go @@ -97,6 +97,7 @@ func readDnsnsrecFunc(d *schema.ResourceData, meta interface{}) error { log.Printf("[DEBUG] citrixadc-provider: FindResourceArrayWithParams dnsnsrec not found in array") log.Printf("[WARN] citrixadc-provider: Clearing dnsnsrec state %s", dnsnsrecId) d.SetId("") + return nil } data := dataArr[foundIndex]