Merge pull request #4891 from stack72/f-aws-sns-ui-deleted

provider/aws: SNS Topic State Refreshing correctly
This commit is contained in:
Paul Stack 2016-01-29 11:03:19 +00:00
commit 2bc5d25bc0

View File

@ -163,6 +163,12 @@ func resourceAwsSnsTopicRead(d *schema.ResourceData, meta interface{}) error {
})
if err != nil {
if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFound" {
log.Printf("[WARN] SNS Topic (%s) not found, error code (404)", d.Id())
d.SetId("")
return nil
}
return err
}