From 5c07728856b5460340514b91451283a941e3b4ed Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Mon, 23 Dec 2024 16:30:42 +0200 Subject: [PATCH] Retrieve also system-defined hostswitch profile while creating transport nodes User may use system-defined hostswitch profiles while creating transport nodes, and should be retrieved as well as user defined hostswitch profiles. Signed-off-by: Kobi Samoray --- nsxt/resource_nsxt_edge_transport_node.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nsxt/resource_nsxt_edge_transport_node.go b/nsxt/resource_nsxt_edge_transport_node.go index cdaa975f0..049332907 100644 --- a/nsxt/resource_nsxt_edge_transport_node.go +++ b/nsxt/resource_nsxt_edge_transport_node.go @@ -965,9 +965,9 @@ func getCPUConfigFromSchema(cpuConfigList []interface{}) []mpmodel.CpuCoreConfig func getHostSwitchProfileResourceType(m interface{}, id string) (string, error) { connector := getPolicyConnector(m) client := infra.NewHostSwitchProfilesClient(connector) - + t := true // we retrieve a list of profiles instead of using Get(), as the id could be either MP id or Policy id - list, err := client.List(nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil) + list, err := client.List(nil, nil, nil, nil, &t, nil, nil, nil, nil, nil, nil, nil) if err != nil { return "", err }