44 "context"
55 "errors"
66 "fmt"
7+ "net"
78 "sort"
89 "strconv"
910 "time"
@@ -293,6 +294,13 @@ func initialiseMinikubeClient(d *schema.ResourceData, m interface{}) (lib.Cluste
293294 apiserverNames = state_utils .ReadSliceState (d .Get ("apiserver_names" ))
294295 }
295296
297+ var apiServerIPs []net.IP
298+ if v , ok := d .GetOk ("apiserver_ips" ); ok {
299+ for _ , ip := range v .(* schema.Set ).List () {
300+ apiServerIPs = append (apiServerIPs , net .ParseIP (ip .(string )))
301+ }
302+ }
303+
296304 apiserverPort := d .Get ("apiserver_port" ).(int )
297305
298306 networkPlugin := d .Get ("network_plugin" ).(string ) // This is a deprecated parameter in Minikube, however,
@@ -322,6 +330,7 @@ func initialiseMinikubeClient(d *schema.ResourceData, m interface{}) (lib.Cluste
322330 Namespace : d .Get ("namespace" ).(string ),
323331 APIServerName : d .Get ("apiserver_name" ).(string ),
324332 APIServerNames : apiserverNames ,
333+ APIServerIPs : apiServerIPs ,
325334 DNSDomain : d .Get ("dns_domain" ).(string ),
326335 FeatureGates : d .Get ("feature_gates" ).(string ),
327336 ContainerRuntime : containerRuntime ,
@@ -462,4 +471,4 @@ func initialiseMinikubeClient(d *schema.ResourceData, m interface{}) (lib.Cluste
462471 })
463472
464473 return clusterClient , nil
465- }
474+ }
0 commit comments