From 40ee24f19a58f89891806a442175aec6bbe84e0b Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Wed, 18 Dec 2024 11:39:57 +0200 Subject: [PATCH] Fix policy importer helper to handle non-path parameter This has been broken, as the importer helper did not return the schema when it was detected that the parameter isn't a policy path. Signed-off-by: Kobi Samoray --- nsxt/policy_utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nsxt/policy_utils.go b/nsxt/policy_utils.go index 69e3a24bc..32fb6c910 100644 --- a/nsxt/policy_utils.go +++ b/nsxt/policy_utils.go @@ -442,7 +442,7 @@ func nsxtPolicyPathResourceImporterHelper(d *schema.ResourceData, m interface{}) importID := d.Id() err := validateImportPolicyPath(importID) if err != nil { - return []*schema.ResourceData{}, err + return []*schema.ResourceData{d}, err } pathSegs := strings.Split(importID, "/")