mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-13 19:01:09 -04:00
if update func called, there's something to update
This commit is contained in:
@@ -261,14 +261,11 @@ func resourceComputeInstanceUpdate(d *schema.ResourceData, meta interface{}) err
|
||||
updateOpts.AccessIPv4 = d.Get("access_ip_v6").(string)
|
||||
}
|
||||
|
||||
// If there's nothing to update, don't waste an HTTP call.
|
||||
if updateOpts != (servers.UpdateOpts{}) {
|
||||
log.Printf("[DEBUG] Updating Server %s with options: %+v", d.Id(), updateOpts)
|
||||
log.Printf("[DEBUG] Updating Server %s with options: %+v", d.Id(), updateOpts)
|
||||
|
||||
_, err := servers.Update(osClient, d.Id(), updateOpts).Extract()
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error updating OpenStack server: %s", err)
|
||||
}
|
||||
_, err := servers.Update(osClient, d.Id(), updateOpts).Extract()
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error updating OpenStack server: %s", err)
|
||||
}
|
||||
|
||||
if d.HasChange("metadata") {
|
||||
|
||||
Reference in New Issue
Block a user