From bd798148158d8ed477d5f8b9b5feaa9a6d6db79a Mon Sep 17 00:00:00 2001 From: Thiery Ouattara Date: Fri, 12 Jan 2024 11:00:11 +0000 Subject: [PATCH] remove Default option --- outscale/resource_outscale_vm.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/outscale/resource_outscale_vm.go b/outscale/resource_outscale_vm.go index 66a19f377..cc8cb5a6a 100644 --- a/outscale/resource_outscale_vm.go +++ b/outscale/resource_outscale_vm.go @@ -714,7 +714,6 @@ func resourceOutscaleOApiVM() *schema.Resource { "wait_tag_before_start": { Type: schema.TypeBool, Optional: true, - Default: false, }, "tags": tagsListOAPISchema(), }, @@ -738,8 +737,8 @@ func resourceOAPIVMCreate(d *schema.ResourceData, meta interface{}) error { vmStateTarget[0] = "stopped" vmOpts.BootOnCreation = oscgo.PtrBool(false) } - vmWaitTag := d.Get("wait_tag_before_start").(bool) - if vmWaitTag { + vmWaitTag, ok := d.GetOk("wait_tag_before_start") + if ok && vmWaitTag.(bool) { vmOpts.BootOnCreation = oscgo.PtrBool(false) } @@ -789,7 +788,7 @@ func resourceOAPIVMCreate(d *schema.ResourceData, meta interface{}) error { return err } } - if vmWaitTag { + if vmWaitTag.(bool) { stateConf := &resource.StateChangeConf{ Pending: []string{"pending"}, Target: []string{"stopped"},