Skip to content

Commit

Permalink
remove Default option
Browse files Browse the repository at this point in the history
  • Loading branch information
outscale-toa committed Jan 12, 2024
1 parent 7890e01 commit bd79814
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions outscale/resource_outscale_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,6 @@ func resourceOutscaleOApiVM() *schema.Resource {
"wait_tag_before_start": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"tags": tagsListOAPISchema(),
},
Expand All @@ -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)
}

Expand Down Expand Up @@ -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"},
Expand Down

0 comments on commit bd79814

Please sign in to comment.