From 38135ab292635e4ee5890525839279a498b3a4cd Mon Sep 17 00:00:00 2001 From: Jeremy Muriel Date: Wed, 18 Dec 2019 15:12:25 +0100 Subject: [PATCH] readInterface return if interfaceNC --- junos/resource_interface.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/junos/resource_interface.go b/junos/resource_interface.go index 80a1abc9..dddc4bb6 100644 --- a/junos/resource_interface.go +++ b/junos/resource_interface.go @@ -516,6 +516,12 @@ func resourceInterfaceRead(d *schema.ResourceData, m interface{}) error { } if !intExists { d.SetId("") + mutex.Unlock() + return nil + } + if err = checkInterfaceNC(d.Get("name").(string), m, jnprSess); err == nil { + d.SetId("") + mutex.Unlock() return nil } interfaceOpt, err := readInterface(d.Get("name").(string), m, jnprSess)