Merge pull request #4943 from stack72/f-aws-dynamodbtable-refresh
provider/aws: DynamoDB Table Refresh State on Error
This commit is contained in:
commit
00ea9c969d
|
@ -583,6 +583,11 @@ func resourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) erro
|
||||||
result, err := dynamodbconn.DescribeTable(req)
|
result, err := dynamodbconn.DescribeTable(req)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" {
|
||||||
|
log.Printf("[WARN] Dynamodb Table (%s) not found, error code (404)", d.Id())
|
||||||
|
d.SetId("")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue