Skip to content

Commit

Permalink
Nil return for absent Bigtable resources (#2935)
Browse files Browse the repository at this point in the history
Merged PR #2935.
  • Loading branch information
emilymye authored and modular-magician committed Jan 7, 2020
1 parent 435551b commit 0d76642
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
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
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 third_party/terraform/resources/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 0d76642

Please sign in to comment.