From ede5ebb368bdf0a07e3ce57d1af6fb89332f0cb7 Mon Sep 17 00:00:00 2001 From: Matt Morrison Date: Fri, 6 Nov 2015 10:15:35 +1300 Subject: [PATCH] Add logging when instance no longer exists --- builtin/providers/google/resource_compute_instance.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/providers/google/resource_compute_instance.go b/builtin/providers/google/resource_compute_instance.go index ce56b17e9..3359c4d64 100644 --- a/builtin/providers/google/resource_compute_instance.go +++ b/builtin/providers/google/resource_compute_instance.go @@ -549,9 +549,11 @@ func resourceComputeInstanceCreate(d *schema.ResourceData, meta interface{}) err func resourceComputeInstanceRead(d *schema.ResourceData, meta interface{}) error { config := meta.(*Config) + id := d.Id() instance, err := getInstance(config, d) if err != nil { if strings.Contains(err.Error(), "no longer exists") { + log.Printf("[WARN] Google Compute Instance (%s) not found", id) return nil } return err