Skip to content

Commit

Permalink
Fix policy importer helper to handle non-path parameter
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ksamoray committed Dec 18, 2024
1 parent 04f276a commit 40ee24f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nsxt/policy_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "/")
Expand Down

0 comments on commit 40ee24f

Please sign in to comment.