provider/aws: Fix DB Subnet refresh issue

This commit is contained in:
Clint Shryock 2015-03-19 16:45:07 -05:00
parent bb4dd8ae77
commit c48a5bf42b

View File

@ -79,6 +79,11 @@ func resourceAwsDbSubnetGroupRead(d *schema.ResourceData, meta interface{}) erro
describeResp, err := rdsconn.DescribeDBSubnetGroups(&describeOpts)
if err != nil {
if ec2err, ok := err.(aws.APIError); ok && ec2err.Code == "DBSubnetGroupNotFoundFault" {
// Update state to indicate the db subnet no longer exists.
d.SetId("")
return nil
}
return err
}