Merge pull request #1254 from hashicorp/b-fix-db-subnet-refresh

provider/aws: Fix DB Subnet refresh issue
This commit is contained in:
Clint 2015-03-20 09:02:57 -05:00
commit d3135c1b2b

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
}