Skip to content

Commit

Permalink
Merge pull request #55 from Scalr/bugfix/SCALRCORE-18531
Browse files Browse the repository at this point in the history
SCALRCORE-18531 > Provider > Refresh state after manually endpoint deleting
  • Loading branch information
emocharnik committed Mar 24, 2021
2 parents 038f924 + 6399aa9 commit c351ddd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scalr/resource_scalr_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ func resourceScalrEndpointRead(d *schema.ResourceData, meta interface{}) error {
endpoint, err := scalrClient.Endpoints.Read(ctx, endpointID)
if err != nil {
if err == scalr.ErrResourceNotFound {
return fmt.Errorf("Could not find endpoint %s: %v", endpointID, err)
d.SetId("")
return nil
}
return fmt.Errorf("Error retrieving endpoint: %v", err)
}
Expand Down

0 comments on commit c351ddd

Please sign in to comment.