mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
Clear BigtableTable schema when resource missing, pass along missing error.
This commit is contained in:
parent
d0d116fa3e
commit
a358f4147f
@ -6,6 +6,7 @@ import (
|
||||
"github.com/hashicorp/terraform/helper/schema"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
"log"
|
||||
)
|
||||
|
||||
func resourceBigtableTable() *schema.Resource {
|
||||
@ -99,7 +100,9 @@ func resourceBigtableTableRead(d *schema.ResourceData, meta interface{}) error {
|
||||
name := d.Id()
|
||||
_, err = c.TableInfo(ctx, name)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error retrieving table. Could not find %s in %s.", name, instanceName)
|
||||
log.Printf("[WARN] Removing %s because it's gone", name)
|
||||
d.SetId("")
|
||||
return fmt.Errorf("Error retrieving table. Could not find %s in %s. %s", name, instanceName, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user