Skip to content

Commit

Permalink
Fix missing state error sagemaker (#1)
Browse files Browse the repository at this point in the history
* Update sagemaker_endpoint_configuration not found message when reading resources

* Update sagemaker_endpoint error when resource is NotFound

* Fix ResourceNotFound to ValidationException
  • Loading branch information
ronaldosaheki authored and jckuester committed Mar 25, 2019
1 parent fc07218 commit 7c38b19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aws/resource_aws_sagemaker_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ func resourceAwsSagemakerEndpointRead(d *schema.ResourceData, meta interface{})

endpointRaw, _, err := SagemakerEndpointStateRefreshFunc(conn, d.Id())()
if err != nil {
if sagemakerErr, ok := err.(awserr.Error); ok && sagemakerErr.Code() == "ValidationException" {
d.SetId("")
return nil
}
return err
}
if endpointRaw == nil {
Expand Down

0 comments on commit 7c38b19

Please sign in to comment.