diff --git a/builtin/providers/google/resource_compute_instance.go b/builtin/providers/google/resource_compute_instance.go index 9079c7a54..5a2d6aa18 100644 --- a/builtin/providers/google/resource_compute_instance.go +++ b/builtin/providers/google/resource_compute_instance.go @@ -321,6 +321,9 @@ func resourceComputeInstanceRead(d *schema.ResourceData, meta interface{}) error func resourceComputeInstanceUpdate(d *schema.ResourceData, meta interface{}) error { config := meta.(*Config) + // Enable partial mode for the resource since it is possible + d.Partial(true) + // If the Metadata has changed, then update that. if d.HasChange("metadata") { metadata := resourceInstanceMetadata(d) @@ -350,6 +353,8 @@ func resourceComputeInstanceUpdate(d *schema.ResourceData, meta interface{}) err // Return the error return OperationError(*op.Error) } + + d.SetPartial("metadata") } if d.HasChange("tags") { @@ -380,8 +385,13 @@ func resourceComputeInstanceUpdate(d *schema.ResourceData, meta interface{}) err // Return the error return OperationError(*op.Error) } + + d.SetPartial("tags") } + // We made it, disable partial mode + d.Partial(false) + return resourceComputeInstanceRead(d, meta) }