From cc1445d760495ee7ae0cbdd18a8a2c9d4e634048 Mon Sep 17 00:00:00 2001 From: Jon Perritt Date: Sun, 18 Jan 2015 20:11:20 -0700 Subject: [PATCH] if update func called, there's something to update --- .../openstack/resource_openstack_compute_instance.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/builtin/providers/openstack/resource_openstack_compute_instance.go b/builtin/providers/openstack/resource_openstack_compute_instance.go index e101e45f7..5ef061c54 100644 --- a/builtin/providers/openstack/resource_openstack_compute_instance.go +++ b/builtin/providers/openstack/resource_openstack_compute_instance.go @@ -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") {