Skip to content

Commit

Permalink
fix: building issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirkrumshtein-f3 committed Jan 10, 2025
1 parent 144fe2d commit de89da8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drpv4/resource_drp_machine_set_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ func resourceMachineSetPool(d *schema.ResourceData, m interface{}) error {
log.Printf("[DEBUG] Get error %+v | %+v", err, requuid)
return fmt.Errorf("error getting machine UUID for address %s: %s", name, err)
}
d.Set("address", mruuid[0].Address)
d.SetId(string(mruuid[0].Uuid))
if mruuid[0].Pool != pool {
patch := jsonpatch2.Patch{{Op: "replace", Path: "/Pool", Value: pool}}
reqm := cc.session.Req().Patch(patch).UrlFor("machines", string(mruuid[0].Uuid.String()))
Expand All @@ -80,9 +82,6 @@ func resourceMachineSetPool(d *schema.ResourceData, m interface{}) error {
return fmt.Errorf("error set pool %s: %s", pool, err)
}
}

d.Set("address", mr.Address)
d.SetId(string(mr.Uuid))
return resourceMachineGetPool(d, m)
}

Expand Down

0 comments on commit de89da8

Please sign in to comment.