Skip to content

Commit

Permalink
Merge pull request #1254 from hashicorp/b-fix-db-subnet-refresh
Browse files Browse the repository at this point in the history
provider/aws: Fix DB Subnet refresh issue
  • Loading branch information
catsby committed Mar 20, 2015
2 parents bb4dd8a + c48a5bf commit d3135c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions builtin/providers/aws/resource_aws_db_subnet_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit d3135c1

Please sign in to comment.