Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Commit

Permalink
TER-258: Log when removing app from state
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Caussat committed Apr 6, 2018
1 parent 03731b8 commit abea547
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ghost/resource_ghost_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ func resourceGhostAppRead(d *schema.ResourceData, meta interface{}) error {
// If app was not found, return nil to show that app is gone
if err.Error()[len(err.Error())-3:] == "404" {
d.SetId("")
log.Printf("[WARN] Ghost app (%s) not found, removing from state", d.Id())
return nil
}
return fmt.Errorf("[ERROR] error reading Ghost app: %v", err)
Expand Down

0 comments on commit abea547

Please sign in to comment.