@@ -81,11 +81,12 @@ func (n *NutanixClientHelper) BuildClientForNutanixClusterWithFallback(ctx conte
8181 return nil , err
8282 }
8383 creds := prismgoclient.Credentials {
84- URL : me .Address .Host ,
85- Endpoint : me .Address .Host ,
86- Insecure : me .Insecure ,
87- Username : me .ApiCredentials .Username ,
88- Password : me .ApiCredentials .Password ,
84+ URL : me .Address .Host ,
85+ Endpoint : me .Address .Host ,
86+ Insecure : me .Insecure ,
87+ Username : me .ApiCredentials .Username ,
88+ Password : me .ApiCredentials .Password ,
89+ SessionAuth : true ,
8990 }
9091 return Build (creds , me .AdditionalTrustBundle )
9192}
@@ -191,16 +192,7 @@ func (n *NutanixClientHelper) buildProviderFromFile() (envTypes.Provider, error)
191192}
192193
193194func Build (creds prismgoclient.Credentials , additionalTrustBundle string ) (* nutanixClientV3.Client , error ) {
194- cli , err := buildClientFromCredentials (creds , additionalTrustBundle )
195- if err != nil {
196- return nil , err
197- }
198- // Check if the client is working
199- _ , err = cli .V3 .GetCurrentLoggedInUser (context .Background ())
200- if err != nil {
201- return nil , fmt .Errorf ("failed to get current logged in user with client: %w" , err )
202- }
203- return cli , nil
195+ return buildClientFromCredentials (creds , additionalTrustBundle )
204196}
205197
206198func buildClientFromCredentials (creds prismgoclient.Credentials , additionalTrustBundle string ) (* nutanixClientV3.Client , error ) {
0 commit comments