From 03cc87b804eb4530e310427c472922b1b7fa88b3 Mon Sep 17 00:00:00 2001 From: Anna Khmelnitsky Date: Thu, 25 Apr 2024 21:09:33 +0000 Subject: [PATCH] Fix SNI paths assignment in LB virtual server Signed-off-by: Anna Khmelnitsky --- nsxt/resource_nsxt_policy_lb_virtual_server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nsxt/resource_nsxt_policy_lb_virtual_server.go b/nsxt/resource_nsxt_policy_lb_virtual_server.go index 1afc683c7..7293f7531 100644 --- a/nsxt/resource_nsxt_policy_lb_virtual_server.go +++ b/nsxt/resource_nsxt_policy_lb_virtual_server.go @@ -909,12 +909,14 @@ func getPolicyClientSSLBindingFromSchema(d *schema.ResourceData) *model.LBClient crlList := interface2StringList(data["crl_paths"].([]interface{})) certPath := data["default_certificate_path"].(string) profilePath := data["ssl_profile_path"].(string) + sniList := interface2StringList(data["sni_paths"].([]interface{})) profileBinding := model.LBClientSslProfileBinding{ CertificateChainDepth: &chainDepth, ClientAuth: &clientAuth, ClientAuthCaPaths: caList, ClientAuthCrlPaths: crlList, DefaultCertificatePath: &certPath, + SniCertificatePaths: sniList, SslProfilePath: &profilePath, } @@ -936,6 +938,7 @@ func setPolicyClientSSLBindingInSchema(d *schema.ResourceData, binding *model.LB } elem["ca_paths"] = binding.ClientAuthCaPaths elem["crl_paths"] = binding.ClientAuthCrlPaths + elem["sni_paths"] = binding.SniCertificatePaths elem["default_certificate_path"] = binding.DefaultCertificatePath if binding.SslProfilePath != nil { elem["ssl_profile_path"] = *binding.SslProfilePath