Merge pull request #5668 from Originate/mb-correctly-handle-missing-lambda
provider/aws: Correctly handle missing lambda function
This commit is contained in:
commit
69c65109cd
|
@ -226,6 +226,10 @@ func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) err
|
|||
|
||||
getFunctionOutput, err := conn.GetFunction(params)
|
||||
if err != nil {
|
||||
if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" {
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue