mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
Merge pull request #1254 from hashicorp/b-fix-db-subnet-refresh
provider/aws: Fix DB Subnet refresh issue
This commit is contained in:
commit
d3135c1b2b
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user