Skip to content

Commit

Permalink
Nil return for absent Bigtable resources (#5331)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>

Co-authored-by: Brian Hildebrandt <brian3.14159@gmail.com>
  • Loading branch information
2 people authored and emilymye committed Jan 7, 2020
1 parent 2c3f94b commit f79d431
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion google/resource_bigtable_gc_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func resourceBigtableGCPolicyRead(d *schema.ResourceData, meta interface{}) erro
if err != nil {
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
}

for _, fi := range ti.FamilyInfos {
Expand Down
2 changes: 1 addition & 1 deletion google/resource_bigtable_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func resourceBigtableInstanceRead(d *schema.ResourceData, meta interface{}) erro
if err != nil {
log.Printf("[WARN] Removing %s because it's gone", instanceName)
d.SetId("")
return fmt.Errorf("Error retrieving instance. Could not find %s. %s", instanceName, err)
return nil
}

d.Set("project", project)
Expand Down
2 changes: 1 addition & 1 deletion google/resource_bigtable_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func resourceBigtableTableRead(d *schema.ResourceData, meta interface{}) error {
if err != nil {
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
}

d.Set("project", project)
Expand Down

0 comments on commit f79d431

Please sign in to comment.