@@ -75,8 +75,8 @@ func resourceClusterUpdate(ctx context.Context, d *schema.ResourceData, m interf
7575 if d .HasChange ("addons" ) {
7676 config := client .GetConfig ()
7777 oldAddons , newAddons := d .GetChange ("addons" )
78- oldAddonStrings := getAddons (oldAddons .(* schema.Set ))
79- newAddonStrings := getAddons (newAddons .(* schema.Set ))
78+ oldAddonStrings := state_utils . SetToSlice (oldAddons .(* schema.Set ))
79+ newAddonStrings := state_utils . SetToSlice (newAddons .(* schema.Set ))
8080
8181 client .SetConfig (lib.MinikubeClientConfig {
8282 ClusterConfig : config .ClusterConfig ,
@@ -248,7 +248,7 @@ func initialiseMinikubeClient(d *schema.ResourceData, m interface{}) (lib.Cluste
248248 addons = & schema.Set {}
249249 }
250250
251- addonStrings := getAddons (addons .(* schema.Set ))
251+ addonStrings := state_utils . SetToSlice (addons .(* schema.Set ))
252252
253253 defaultIsos , ok := d .GetOk ("iso_url" )
254254 if ! ok {
@@ -357,6 +357,12 @@ func initialiseMinikubeClient(d *schema.ResourceData, m interface{}) (lib.Cluste
357357 return nil , errors .New ("at least 3 nodes is required for high availability" )
358358 }
359359
360+ vcs := state_utils .SetToSlice (d .Get ("wait" ).(* schema.Set ))
361+ vc := make (map [string ]bool )
362+ for _ , c := range vcs {
363+ vc [c ] = true
364+ }
365+
360366 cc := config.ClusterConfig {
361367 Addons : addonConfig ,
362368 APIServerPort : d .Get ("apiserver_port" ).(int ),
@@ -422,6 +428,7 @@ func initialiseMinikubeClient(d *schema.ResourceData, m interface{}) (lib.Cluste
422428 GPUs : d .Get ("gpus" ).(string ),
423429 SocketVMnetPath : d .Get ("socket_vmnet_path" ).(string ),
424430 SocketVMnetClientPath : d .Get ("socket_vmnet_client_path" ).(string ),
431+ VerifyComponents : vc ,
425432 }
426433
427434 clusterClient .SetConfig (lib.MinikubeClientConfig {
@@ -441,15 +448,3 @@ func initialiseMinikubeClient(d *schema.ResourceData, m interface{}) (lib.Cluste
441448
442449 return clusterClient , nil
443450}
444-
445- func getAddons (addons * schema.Set ) []string {
446- addonStrings := make ([]string , addons .Len ())
447- addonObjects := addons .List ()
448- for i , v := range addonObjects {
449- addonStrings [i ] = v .(string )
450- }
451-
452- sort .Strings (addonStrings ) //to ensure consistency with TF state
453-
454- return addonStrings
455- }
0 commit comments